I want to understand why doctrine works that way, that when i persist and flush a document with collection of embedded documents inside, it is sent to Mongo with 2 seperate upserts instead of 1 atomic updateOne containing all of the data ( 2nd updateOne sends all the arrays of embedded documents, first updateOne sends all the rest, non array embedded documents).
This is done because we have several strategies for updating array of objects. If you want everything in a single query, please use atomicSet (for associative arrays) or atomicSetArray (for lists).
Support Question
I want to understand why doctrine works that way, that when i persist and flush a document with collection of embedded documents inside, it is sent to Mongo with 2 seperate upserts instead of 1 atomic updateOne containing all of the data ( 2nd updateOne sends all the arrays of embedded documents, first updateOne sends all the rest, non array embedded documents).