[MODM-85] Saving a array over the top of a PersistentCollection results in duplicated data Created: 08/Oct/10 Updated: 24/Nov/10 Resolved: 24/Nov/10
|Project:||Doctrine MongoDB ODM|
|Reporter:||Andy Stanberry||Assignee:||Jonathan H. Wage|
Mongo 1.6.1, opensky/mongo-odm/master
If you take an document that has a referenceMany and overwrite a PersistentCollection of data with an array, even of the same data, the data is appended to the collection instead of replacing it.
|Comment by Sebastian Hoitz [ 12/Oct/10 ]|
Are you using the most recent version of Doctrine MongoDB ODM?
I'm asking because there was a bug fix for something where all embedded documents were duplicated.
However I'm also currently investigating a bug where in some cases only one entry does not get removed (although $pullAll is called correctly).
|Comment by Jonathan H. Wage [ 19/Oct/10 ]|
Bulat, this is the same issue where PersistentCollection is never initialized so thats why the array_diff always appends the data with a $pushAll. Remember we talked about it? we can fix it just need to chat about it for a bit.
|Comment by Jonathan H. Wage [ 24/Nov/10 ]|
This is not a problem anymore after the recent refactoring!