-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
i was noticing strange problems with updating fields being used as composite keys. the queries seemed to be running correctly, however when i started to investigate their actual persistence to the DB, i got another story.
i documented a simple example of the behavior here... http://pastie.org/1963766
basically updating a field involved with being a composite key, would return true when updated, and even the id being modified properly... but apparently only in memory. When hitting the DB, the object still has pre-update data. It even prevents other non-key attributes included in the query to not be updated.
If this is the desired behavior, mongoid should throw an error instead of returning true for an unpersisted update... but isn't updating an id possible with Mongo?