File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1248,6 +1248,14 @@ is used for pessimistic and optimistic locking. This is only compatible with
12481248 /** @Int @Version */
12491249 private $version;
12501250
1251+ By default, Doctrine ODM processes updates :ref: `embed-many <embed_many >` and
1252+ :ref: `reference-many <reference_many >` collections in separate write operations,
1253+ which do not bump the document version. Users employing document versioning are
1254+ encouraged to use the :ref: `atomicSet <atomic_set >` or
1255+ :ref: `atomicSetArray <atomic_set_array >` strategies for such collections, which
1256+ will ensure that collections are updated in the same write operation as the
1257+ versioned document.
1258+
12511259.. _BSON specification : http://bsonspec.org/spec.html
12521260.. _DBRef : http://docs.mongodb.org/manual/reference/database-references/#dbrefs
12531261.. _geoNear command : http://docs.mongodb.org/manual/reference/command/geoNear/
Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ elements into the array. MongoDB does not allow elements to be added and removed
5252from an array in a single operation, so this strategy relies on multiple update
5353queries to remove and insert elements (in that order).
5454
55+ .. _atomic_set :
56+
5557``atomicSet ``
5658-------------
5759
@@ -66,6 +68,8 @@ strategy can be especially useful when dealing with high concurrency and
6668 The ``atomicSet `` and ``atomicSetArray `` strategies may only be used for
6769 collections mapped directly in a top-level document.
6870
71+ .. _atomic_set_array :
72+
6973``atomicSetArray ``
7074------------------
7175
You can’t perform that action at this time.
0 commit comments