File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
source/fundamentals/data-formats Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ You can use the following annotations on data classes:
9999.. list-table::
100100 :header-rows: 1
101101 :stub-columns: 1
102- :widths: 10 10
102+ :widths: 30 70
103103
104104 * - Annotation Name
105105 - Description
@@ -112,8 +112,15 @@ You can use the following annotations on data classes:
112112 field to BSON.
113113
114114 * - ``BsonRepresentation``
115- - Specifies the BSON type used to store the value when different from the
116- data class property.
115+ - Specifies the BSON type MongoDB uses to store the value. Use this
116+ annotation only when you need to store a value as a different
117+ BSON type than the data class property.
118+
119+ .. warning::
120+
121+ Your code might throw an exception if you include the
122+ ``BsonRepresentation`` annotation on a property that you store
123+ as the same type as the data class property.
117124
118125For reference information on these property annotations,
119126refer to the `org.bson.codecs.pojo.annotations <{+api+}/apidocs/bson/org/bson/codecs/pojo/annotations/package-summary.html>`__
You can’t perform that action at this time.
0 commit comments