Skip to content

Commit e506eac

Browse files
Update whats-new.txt
1 parent 4eb12a0 commit e506eac

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

source/whats-new.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,23 @@ Removal of Deprecated Class ``Mongoid::Errors::InvalidStorageParent``
148148
The deprecated class ``{+odm+}::Errors::InvalidStorageParent`` has been
149149
removed.
150150

151+
``around_*`` Callbacks for Embedded Documents are Ignored by Default
152+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153+
154+
{+odm+} v8.x and older allow user to define ``around_*`` callbacks for embedded
155+
documents. Starting in v9.0, by default, these callbacks are ignored and will
156+
not be executed. A warning will be printed to the console if such callbacks are defined.
157+
158+
If you want to restore the old behavior, you can set
159+
``Mongoid.around_callbacks_for_embeds`` to true in your application.
160+
161+
.. note::
162+
163+
Enabling ``around_*`` callbacks for embedded documents is not recommended
164+
as it may cause ``SystemStackError`` exceptions when a document has many
165+
embedded documents. See `MONGOID-5658
166+
<https://jira.mongodb.org/browse/MONGOID-5658>`__ for more details.
167+
151168
``for_js`` Method is Deprecated
152169
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153170

0 commit comments

Comments
 (0)