@@ -64,6 +64,22 @@ Version 4.8 Breaking Changes
6464 module if your application deploys the driver in an OSGi container and
6565 relies on the driver for encoding and decoding Java records.
6666
67+ - The ``RecordCodec``, implemented in v4.6, deserialized POJOs and record
68+ classes that are specified as type parameters of ``List`` or ``Map`` fields
69+ of a record as ``Document`` values instead of their respective classes. This
70+ version now deserializes them to the proper record and POJO types.
71+
72+ For example, the following record class definitions show a ``Book`` record
73+ that contains a ``List`` that receives a ``Chapter`` type parameter:
74+
75+ .. code-block:: java
76+
77+ public record Book(String title, List<Chapter> chapters) {}
78+ public record Chapter(Integer number, String text) {}
79+
80+ Starting in this version, the codec deserializes data in the ``List`` into
81+ ``Chapter`` record classes instead of ``Document`` values.
82+
6783.. _java-breaking-changes-v4.7:
6884
6985Version 4.7 Breaking Changes
@@ -157,7 +173,7 @@ Version 4.8 Server Release Support Changes
157173
158174- The v4.8 driver drops support for {+mdb-server+} v3.4 and earlier.
159175 To use the v4.8 driver, your {+mdb-server+} must be v3.6 or later. To learn
160- how to upgrade your {+mdb-server+} to v3.6, follow the link that corresponds
176+ how to upgrade your {+mdb-server+} to v3.6, follow the link that corresponds
161177 to your MongoDB deployment configuration:
162178
163179 - :ref:`<3.6-upgrade-replica-set>`
0 commit comments