Skip to content

Commit 5d90419

Browse files
authored
[JAVA] Remove deprecated record annotations (#493)
* remove references to deprecated annotations
1 parent 150b286 commit 5d90419

File tree

1 file changed

+17
-31
lines changed

1 file changed

+17
-31
lines changed

source/fundamentals/data-formats/document-data-format-record.txt

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
Document Data Format: Records
55
=============================
66

7-
.. default-domain:: mongodb
7+
.. facet::
8+
:name: genre
9+
:values: reference
10+
11+
.. meta::
12+
:keywords: annotations, abstraction, codec
813

914
.. contents:: On this page
1015
:local:
@@ -100,36 +105,10 @@ as shown in the following code:
100105
Specify Component Conversion Using Annotations
101106
----------------------------------------------
102107

103-
This section describes the annotations you can use to configure the
104-
serialization behavior of record components and provides an example to
105-
demonstrate the annotation behavior.
106-
107-
.. tip::
108-
109-
The ``org.bson.codecs.records.annotations`` package is deprecated. Use the
110-
equivalent ones from the `org.bson.codecs.pojo.annotations <{+api+}/apidocs/bson/org/bson/codecs/pojo/annotations/package-summary.html>`__
111-
package instead.
112-
113-
You can use the following annotations on record components:
114-
115-
.. list-table::
116-
:header-rows: 1
117-
:stub-columns: 1
118-
:widths: 10 10
119-
120-
* - Annotation Name
121-
- Description
122-
123-
* - ``BsonId``
124-
- Specifies the component to serialize as the _id property.
125-
126-
* - ``BsonProperty``
127-
- Specifies a custom document field name when converting the record
128-
component to BSON. Accepts the field name as the parameter.
129-
130-
* - ``BsonRepresentation``
131-
- Specifies a BSON type to store when different from the record component
132-
type. Accepts the BSON type as the parameter.
108+
This section describes how to configure the serialization behavior of record components
109+
by using annotations. For a full list of supported annotations, see the
110+
`org.bson.codecs.pojo.annotations package API documentation.
111+
<{+api+}/apidocs/bson/org/bson/codecs/pojo/annotations/package-summary.html>`__
133112

134113
.. note::
135114

@@ -196,6 +175,13 @@ as shown in the following code:
196175

197176
NetworkDeviceRecord[deviceId=fedc..., name=Enterprise Wi-fi, deviceType=router]
198177

178+
.. note::
179+
180+
The ``org.bson.codecs.records.annotations`` package is deprecated. Use the equivalent
181+
annotations from the `org.bson.codecs.pojo.annotations
182+
<{+api+}/apidocs/bson/org/bson/codecs/pojo/annotations/package-summary.html>`__ package
183+
instead.
184+
199185
Operations with Recursive Types
200186
-------------------------------
201187

0 commit comments

Comments
 (0)