Skip to content

Commit 5fcbce2

Browse files
p-mongop
andauthored
MONGOID-5162 Add a release note for the planned changes in ObjectId#as_json (#5059)
* MONGOID-5162 Add a release note for the planned changes in ObjectId#as_json * fix version # Co-authored-by: Oleg Pudeyev <[email protected]>
1 parent 84312b6 commit 5fcbce2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/release-notes/mongoid-7.4.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,19 @@ and matches the core Ruby behavior:
9595

9696
Band === cover_band
9797
# => true
98+
99+
100+
``BSON::ObjectId#as_json`` Implementation Removed
101+
-------------------------------------------------
102+
103+
Mongoid in versions up to 7.3 used to provide a ``BSON::ObjectId#as_json``
104+
implementation that was identical to the one provided by ``bson-ruby``.
105+
Mongoid 7.4 removes its copy of this implementation.
106+
107+
This change has no immediate impact on applications - ``BSON::ObjectId#as_json``
108+
behaves the same in Mongoid 7.4 as it did in Mongoid 7.3. However, if
109+
this implementation is changed in a future version of ``bson-ruby``
110+
which is `under consideration <https://jira.mongodb.org/browse/MONGOID-5158>`_,
111+
Mongoid 7.4 and later will inherit the new implementation provided by
112+
``bson-ruby`` while Mongoid 7.3 and earlier will continue with the
113+
implementation returning a hash of ``{"$oid" => "..."}``.

0 commit comments

Comments
 (0)