Skip to content

MONGOID-5162 Add a release note for the planned changes in ObjectId#as_json #5059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/release-notes/mongoid-7.4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,19 @@ and matches the core Ruby behavior:

Band === cover_band
# => true


``BSON::ObjectId#as_json`` Implementation Removed
-------------------------------------------------

Mongoid in versions up to 7.3 used to provide a ``BSON::ObjectId#as_json``
implementation that was identical to the one provided by ``bson-ruby``.
Mongoid 7.4 removes its copy of this implementation.

This change has no immediate impact on applications - ``BSON::ObjectId#as_json``
behaves the same in Mongoid 7.4 as it did in Mongoid 7.3. However, if
this implementation is changed in a future version of ``bson-ruby``
which is `under consideration <https://jira.mongodb.org/browse/MONGOID-5158>`_,
Mongoid 7.4 and later will inherit the new implementation provided by
``bson-ruby`` while Mongoid 7.3 and earlier will continue with the
implementation returning a hash of ``{"$oid" => "..."}``.