Skip to content

Commit 80b935e

Browse files
committed
Added documentation for the SET_PRIVATE_FIELDS_CONVENTION
JAVA-2648
1 parent cc640ff commit 80b935e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

docs/reference/content/bson/pojos.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@ The following Conventions are available from the [`Conventions`]({{<apiref "org/
315315
* The [`CLASS_AND_PROPERTY_CONVENTION`]({{<apiref "org/bson/codecs/pojo/Conventions.html#CLASS_AND_PROPERTY_CONVENTION">}}). Sets the
316316
discriminator key if not set to `_t` and the discriminator value if not set to the ClassModels simple type name. Also, configures
317317
the PropertyModels. If the `idProperty` isn't set and there is a property named `_id` or `id` then it will be marked as the `idProperty`.
318+
* The [`SET_PRIVATE_FIELDS_CONVENTION`]({{<apiref "org/bson/codecs/pojo/Conventions.html#SET_PRIVATE_FIELDS_CONVENTION">}}). Enables
319+
private fields to be set directly using reflection, without the need of a setter method. Note this convention is not enabled by default.
318320
* The [`DEFAULT_CONVENTIONS`]({{<apiref "org/bson/codecs/pojo/Conventions.html#DEFAULT_CONVENTIONS">}}), a list containing the
319321
`ANNOTATION_CONVENTION` and the `CLASS_AND_PROPERTY_CONVENTION`.
320322
* The [`NO_CONVENTIONS`]({{<apiref "org/bson/codecs/pojo/Conventions.html#NO_CONVENTIONS">}}) an empty list.

docs/reference/content/whats-new.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ The 3.6 release brings new improvements to the `PojoCodec`:
4848
* Support for custom Collection and Map implementations.
4949
* Improvements to the `BsonCreator` annotation, which now supports `@BsonId` and `@BsonProperty` with values that represent the read name of the property.
5050
* A new [`PropertyCodecProvider`]({{<apiref "org/bson/codecs/pojo/PropertyCodecProvider">}}) API, allowing for easy and type-safe handling of container types.
51+
* Added the [`SET_PRIVATE_FIELDS_CONVENTION`]({{<apiref "org/bson/codecs/pojo/Conventions.html#SET_PRIVATE_FIELDS_CONVENTION">}}) convention.
5152

5253
The MongoDB Java drivers team would like to thank both [Joseph Florencio](https://github.com/jflorencio) and [Qi Liu](https://github.com/visualage)
5354
for their excellent contributions to the PojoCodec.

0 commit comments

Comments
 (0)