-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
I ran into an issue upgrading from 2.0.2 to 2.1.8 last night. It seems to that assigning an array of documents to a has_many field deletes all the documents. I was using this approach to batch load a bunch of has_many associations, rather than making multiple DB roundtrips, and managed to lose a bunch of data (MongoHQ helped me recover from a backup, phew).
Here's a gist demonstrating the issue:
https://gist.github.com/1161008
This seems non-optimal to me! I've since worked around it by getting rid of the relationship altogether and just emulating the bits I needed.