@ -339,7 +339,7 @@ Inside transactions, MongoDB server has a slightly different behavior.
@@ -339,7 +339,7 @@ Inside transactions, MongoDB server has a slightly different behavior.
*Connection Settings*
The MongoDB drivers offer a dedicated replica set name configuration option turing the driver into auto detection
mode. This option helps identifying replica set manager nodes and command routing during a transaction.
mode. This option helps identifying the primary replica set nodes and command routing during a transaction.
NOTE: Make sure to add `replicaSet` to the MongoDB URI. Please refer to https://docs.mongodb.com/manual/reference/connection-string/#connections-connection-options[connection string options] for further details.
@ -785,7 +785,9 @@ class Nested {
@@ -785,7 +785,9 @@ class Nested {
[[mapping-usage-references]]
=== Using DBRefs
The mapping framework does not have to store child objects embedded within the document. You can also store them separately and use a DBRef to refer to that document. When the object is loaded from MongoDB, those references are eagerly resolved so that you get back a mapped object that looks the same as if it had been stored embedded within your controlling document.
The mapping framework does not have to store child objects embedded within the document.
You can also store them separately and use a DBRef to refer to that document.
When the object is loaded from MongoDB, those references are eagerly resolved so that you get back a mapped object that looks the same as if it had been stored embedded within your top-level document.
The following example uses a DBRef to refer to a specific document that exists independently of the object in which it is referenced (both classes are shown in-line for brevity's sake):