Skip to content

Commit ffe51a0

Browse files
committed
DOCSP-42961: Removed Nested Components (mongodb#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 bcde2e5 commit ffe51a0

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
@@ -259,26 +259,23 @@ settings to modify the driver's behavior:
259259

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

283280
* - ``srvMaxHosts()``
284281
- | 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)