mongodb-odm icon indicating copy to clipboard operation
mongodb-odm copied to clipboard

Change default collection startegy to atomicSetArray

Open malarzm opened this issue 9 years ago • 1 comments

This was raised by @blockjon and @daniphp (https://github.com/doctrine/mongodb-odm/pull/1096#issuecomment-143741431) - I agree that this could be done, atomicSetArray was chosen to keep collections as list by default HOWEVER this is a BC break as deeply nested addToSet are no longer working as expected and also upserts can be hurt.

@jmikola @jwage @alcaeus thoughts?

malarzm avatar Oct 02 '15 18:10 malarzm

Pushing this back to 2.x - with the new filtered positional operator we are now able to create atomic collection updates not only on the root level but also in nested arrays. I'd say we should wait until this is implemented before changing the default strategy.

alcaeus avatar Apr 12 '18 14:04 alcaeus