ruby - cascade_callbacks not working for embedded doc in mongoid -
i'm using mongoid, , have 1 class (order) "embeds_many" of class (lineitem). specifically, in order, have:
embeds_many :line_items, cascade_callbacks: true
and in lineitem, have:
embedded_in :order
everything works should except cascading_callbacks. when make change order object , call "save", expect "after_save" callbacks on of embedded lineitem objects called. not happening. thought point of cascading_callbacks.
am incorrect? else required make save-related callbacks fire each embedded document when parent saved , cascade_callbacks set true in relationship?
i think, when specify cascade callbacks: true in parent document, callbacks of embedded documents fired when make change in corresponding embedded document.
check, change in embedded document , save parent document. in case think callbacks fired
Comments
Post a Comment