-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
When doing update_attributes on embedded docs through accepts_nested_attributes_for mongo driver returns error Mongo::OperationFailure (have conflict mod). One must be doing update on an existing embedded doc and inserting a new one, please see the failing integration spec (stack trace included): http://gist.github.com/476801
I think that Mongoid should not perform queries that MongoDB cannot handle at the moment.
Failing code:
person = Person.new
person.addresses.build("street" => "Folsom", "city" => "San Francisco")
person.save!
@attributes = {
"0" =>
,
"1" =>
,
}
person.update_attributes :addresses_attributes => @attributes