Browse files

Update the 3.46.0 release notes

I noticed that the cache clearing changes can affect backwards
compatibility slightly, so note that and give an example in the
release notes.
  • Loading branch information...
1 parent 70a4b7b commit 6386cdcd069814d1bd82c23bfbed45e2924cff61 @jeremyevans committed Apr 2, 2013
Showing with 25 additions and 1 deletion.
  1. +25 −1 doc/release_notes/3.46.0.txt
View
26 doc/release_notes/3.46.0.txt
@@ -57,7 +57,9 @@
were incorrectly converted to 0000-01-01.
* The associations, composition, serialization, and dirty plugins
- now clear caches stored in the instance in some additional cases.
+ now clear caches stored in the instance in some additional cases,
+ such as when saving model instances when the dataset supports
+ insert_select.
* Model#validates_type in the validation_helpers plugin now handles
false values correctly.
@@ -77,6 +79,28 @@
= Backwards Compatibility
+* The change to make associations, composition, serialization, and
+ dirty now clear caches after saving when the dataset supports
+ insert_select can break code that expected the previous behavior.
+ For example:
+
+ artist = Artist[1]
+ artist.has_albums # => false
+
+ album = Album.new(:artist=>artist)
+ def album.after_create
+ super
+ artist.update(:has_albums=>true)
+ end
+ album.save
+
+ artist.has_albums # => false
+
+ Such code should either refresh the artist after saving the album,
+ or use album.artist.has_albums. You already had to do that if
+ the dataset did not support insert_select; the impetus for this
+ change was to make the behavior consistent.
+
* Decimal/numeric columns are now strictly typecast by default,
similar to integer and real/double precision columns. If you want
the previous loose typecasting to for decimal/numeric columns,

0 comments on commit 6386cdc

Please sign in to comment.