Search code examples
mongodbsymfonydoctrine-odmodm

ODM Annotation : What is "strategy" attribute?


What is strategy attribute in @EmbedOne annotation? And what is the difference between its values? set , pushAll I not find any good explain in references about Annotation in ODM,like Annotations Reference , ...

Is there a complete reference,cheat sheet,or slide about annotation?


Solution

  • That is likely a copy/paste error in the documentation and should be removed. The set and pushAll strategies only apply to collections (e.g. EmbedMany, ReferenceMany), and determine what update operations will be used to persist changes back to MongoDB. They are described in more detail in the Storage Strategies page (in addition to some other strategies).