Skip to content

Commit b9dd86a

Browse files
committed
DOCSP-42961: Removed Nested Components (#581)
* DOCSP-42961: Removed Nested Components * Fixing indentation errors * Fixing indentation errors again * Fixing indentation errors again * Fixing indentation errors again * Fixing indentation errors again+ * Fixing indentation errors again+ * Fixing code block indentation * tweaks based on internal review feedback * tweaks based on internal review feedback - indentation issues * tweaks based on internal review feedback - indentation issues * tweaks based on internal review feedback - indentation issues * tweaks based on internal review feedback - indentation issues * tweaks to bullet issue * tweaks to bullet issue (cherry picked from commit 1ec4a2c)
1 parent fe338cd commit b9dd86a

File tree

2 files changed

+32
-43
lines changed

2 files changed

+32
-43
lines changed

source/fundamentals/connection/mongoclientsettings.txt

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -253,26 +253,23 @@ settings to modify the driver's behavior:
253253

254254
* - ``serverSelector()``
255255
- Adds a server selector to apply before server selection.
256-
256+
257257
* - ``srvHost()``
258-
- Sets the host name to use to look up an SRV DNS record to find the
259-
MongoDB hosts.
260-
261-
.. note::
262-
263-
When setting ``srvHost``, the driver does not process any
264-
associated TXT records associated with the host.
265-
266-
If you want to enable the processing of TXT records, you must
267-
specify the SRV host in the connection string using the
268-
``applyConnectionString()`` method.
269-
270-
.. code-block:: java
271-
:emphasize-lines: 3
272-
273-
MongoClient mongoClient = MongoClients.create(
274-
MongoClientSettings.builder()
275-
.applyConnectionString(new ConnectionString("mongodb+srv://host1.acme.com")))
258+
- | Sets the host name to use to look up an SRV DNS record to find the
259+
MongoDB hosts.
260+
|
261+
| If you want to enable the processing of TXT records associated with the host,
262+
specify the SRV host in the connection string
263+
using the ``applyConnectionString()`` method.
264+
|
265+
| For example:
266+
267+
.. code-block:: java
268+
:emphasize-lines: 3
269+
270+
MongoClient mongoClient =
271+
MongoClients.create(MongoClientSettings.builder()
272+
.applyConnectionString(new ConnectionString("mongodb+srv://host1.acme.com")))
276273

277274
* - ``srvMaxHosts()``
278275
- | Sets the maximum number of hosts the driver can connect to when using

source/fundamentals/data-formats/pojo-customization.txt

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,7 @@ package:
285285

286286
* - ``BsonRepresentation``
287287
- Specifies the BSON type used to store the value when different from the
288-
POJO property.
289-
290-
.. seealso::
291-
292-
:ref:`bsonrepresentation-annotation-code-example`
288+
POJO property. See an example of :ref:`bsonrepresentation-annotation-code-example` on this page.
293289

294290
* - ``BsonId``
295291
- Marks a property to serialize as the _id property.
@@ -299,28 +295,24 @@ package:
299295
and/or deserialize a property.
300296

301297
* - ``BsonProperty``
302-
- Specifies a custom document field name when converting the POJO
303-
field to BSON. You can include a discriminator to serialize POJOs
304-
nested within the field.
305-
306-
.. important::
298+
- | Specifies a custom document field name when converting the POJO
299+
field to BSON. You can include a discriminator to serialize POJOs
300+
nested within the field.
301+
|
302+
| When applying ``@BsonProperty`` to a private field,
303+
**you must also add getter and setter methods for that field to serialize and
304+
customize the field name**.
307305

308-
When applying ``@BsonProperty`` to a private field, you must also add
309-
getter and setter methods for that field to serialize and customize
310-
the field name.
311306

312307
* - ``BsonExtraElements``
313-
- Specifies the POJO field on which to deserialize all elements that are
314-
not mapped to a field. The POJO field must be one of the following
315-
types:
316-
317-
- `Document <{+api+}/apidocs/bson/org/bson/Document.html>`__
318-
- `BsonDocument <{+api+}/apidocs/bson/org/bson/BsonDocument.html>`__
319-
- ``Map<String, Object>``
320-
321-
.. seealso::
322-
323-
:ref:`BsonExtraElements Annotation Example <bsonextraelements-annotation-code-example>`
308+
- | Specifies the POJO field on which to deserialize all elements that are
309+
not mapped to a field. The POJO field must be one of the following
310+
types:
311+
| - `Document <{+api+}/apidocs/bson/org/bson/Document.html>`__
312+
| - `BsonDocument <{+api+}/apidocs/bson/org/bson/BsonDocument.html>`__
313+
| - ``Map<String, Object>``
314+
|
315+
| See an example of a :ref:`BsonExtraElements Annotation Example <bsonextraelements-annotation-code-example>`.
324316

325317
The following code snippet shows a sample POJO called ``Product`` that uses
326318
several of the preceding annotations.

0 commit comments

Comments
 (0)