Skip to content

DOCSP-42961: Removed Nested Components #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 15 additions & 19 deletions source/fundamentals/connection/mongoclientsettings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -259,26 +259,22 @@ settings to modify the driver's behavior:

* - ``serverSelector()``
- Adds a server selector to apply before server selection.

* - ``srvHost()``
- Sets the host name to use to look up an SRV DNS record to find the
MongoDB hosts.

.. note::

When setting ``srvHost``, the driver does not process any
associated TXT records associated with the host.

If you want to enable the processing of TXT records, you must
specify the SRV host in the connection string using the
``applyConnectionString()`` method.

.. code-block:: java
:emphasize-lines: 3

MongoClient mongoClient = MongoClients.create(
MongoClientSettings.builder()
.applyConnectionString(new ConnectionString("mongodb+srv://host1.acme.com")))
- | Sets the host name to use to look up an SRV DNS record to find the
MongoDB hosts. When setting ``srvHost``, the driver does not process any associated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MongoDB hosts. When setting ``srvHost``, the driver does not process any associated
MongoDB hosts.
When setting ``srvHost``, the driver does not process any associated

Suggestion: Separate the method definition from the implementation details. Think it looks a bit crowded as is and seems to match the format of the next table entry.

TXT records associated with the host. If you want to enable the processing of TXT records,
you must specify the SRV host in the connection string
using the ``applyConnectionString()`` method.
|
| For example:

.. code-block:: java
:emphasize-lines: 3

MongoClient mongoClient =
MongoClients.create(MongoClientSettings.builder()
.applyConnectionString(new ConnectionString("mongodb+srv://host1.acme.com")))

* - ``srvMaxHosts()``
- | Sets the maximum number of hosts the driver can connect to when using
Expand Down
24 changes: 7 additions & 17 deletions source/fundamentals/data-formats/pojo-customization.txt
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,7 @@ package:

* - ``BsonRepresentation``
- Specifies the BSON type used to store the value when different from the
POJO property.

.. seealso::

:ref:`bsonrepresentation-annotation-code-example`
POJO property. :ref:`bsonrepresentation-annotation-code-example`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
POJO property. :ref:`bsonrepresentation-annotation-code-example`
POJO property.
For more information on properly using the annotation, see the below :ref:`bsonrepresentation-annotation-code-example` on this page.

Suggestion: Think it would be good to keep consistent with the sentence formatting and add an intro to the example. Also nice to indicate that the example is below on the same page.
Style guide on Table Text formatting: https://www.mongodb.com/docs/meta/style-guide/style/tables/#std-label-tables-text


* - ``BsonId``
- Marks a property to serialize as the _id property.
Expand All @@ -301,13 +297,9 @@ package:
* - ``BsonProperty``
- Specifies a custom document field name when converting the POJO
field to BSON. You can include a discriminator to serialize POJOs
nested within the field.

.. important::

When applying ``@BsonProperty`` to a private field, you must also add
getter and setter methods for that field to serialize and customize
the field name.
nested within the field. When applying ``@BsonProperty`` to a private field,
**you must also add getter and setter methods for that field to serialize and
customize the field name**.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nested within the field. When applying ``@BsonProperty`` to a private field,
**you must also add getter and setter methods for that field to serialize and
customize the field name**.
nested within the field.
When applying ``@BsonProperty`` to a private field,
**you must also add getter and setter methods for that field to serialize and
customize the field name**.

Suggestion: Separate implementation detail from rest of definition for ease of reading.


* - ``BsonExtraElements``
- Specifies the POJO field on which to deserialize all elements that are
Expand All @@ -316,11 +308,9 @@ package:

- `Document <{+api+}/apidocs/bson/org/bson/Document.html>`__
- `BsonDocument <{+api+}/apidocs/bson/org/bson/BsonDocument.html>`__
- ``Map<String, Object>``

.. seealso::

:ref:`BsonExtraElements Annotation Example <bsonextraelements-annotation-code-example>`
- ``Map<String, Object>``

:ref:`BsonExtraElements Annotation Example <bsonextraelements-annotation-code-example>`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:ref:`BsonExtraElements Annotation Example <bsonextraelements-annotation-code-example>`
For more information on using the annotation, see the below :ref:`BsonExtraElements Annotation Example <bsonextraelements-annotation-code-example>` on this page.

Suggestion: Same as above, think it would be nice to introduce ex. in a sentence.


The following code snippet shows a sample POJO called ``Product`` that uses
several of the preceding annotations.
Expand Down
Loading