mongodb-odm
mongodb-odm copied to clipboard
Change default collection startegy to atomicSetArray
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?
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.