-
Type: Question
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Associations
-
None
- In the 9.0 changelog, I see that around_* callbacks for embedded documents are now ignored.
- The changelog entry says "See
MONGOID-5658for details", but nowhere in that ticket or its thread gives any details as to why specifically around_* was removed. - Additionally the author of
MONGOID-5658does not mention around_*, nor does their code example have any user-defined callbacks all. - Moreover, the user notes the issue worked fine in Mongoid 7.x but broke in 8.x.
Given this, please:
- Clarify why around_* callbacks were removed for embedded?
- Clarify why before/after_* are not removed (or are they?)
- Explain what avenues were explored to keep around_* for callbacks? For example, would it be possible to "flatten the stack" so that callbacks are enqueued (i.e. "registered") on the parent object, and we iterate over the queue rather than using recursion?