-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
Just added a bounty, here:
http://stackoverflow.com/questions/13204896/mongoid-save-fails-silently-without-embedded-in-relation
I have one document embedded in another in Mongoid.
class A < B include Mongoid::Document embeds_one :shipping_address, class_name: 'Address'
I have, in my case, omitted the inverse relation:
class Address # embedded_in :A
Why is it, that although the API works fine and completely as expected:
address = A.address address.zip = 1234 a.changed? #true address.save a.changed? #false
The document is not actually saved?
If i return the embedded_in statement, the save actually works fine.