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:
99
99
.. list-table::
100
100
:header-rows: 1
101
101
:stub-columns: 1
102
- :widths: 10 10
102
+ :widths: 30 70
103
103
104
104
* - Annotation Name
105
105
- Description
@@ -112,8 +112,15 @@ You can use the following annotations on data classes:
112
112
field to BSON.
113
113
114
114
* - ``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.
117
124
118
125
For reference information on these property annotations,
119
126
refer 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