Closed aliatsis closed 8 years ago
Is this the same issue as #3679 or is there something different?
@vkarpov15 they are different in that pre('init') seems to work for a single nested schema but not for embedded documents within a single nested schema.
also pre('save') works on a single nested schema as well but not for embedded documents within a single nested schema.
Ah ok now I understand. Thanks for reporting and clarifying, will fix today.
awesome! thanks for the quick fix!
@vkarpov15 not sure if this is an issue or not so I didn't want to create a new ticket.
What is the expected order of the hooks in this case? I put logs in my hooks and received the following:
pre save: single nested
pre save: embedded
pre save: parent
post save: parent
post save: single nested
post save: embedded
post save: embedded
post save: single nested
Shouldn't pre-save be bottom-up (e.g. embedded > single nested > parent) and post-save be top-down (e.g. parent > single nested > embedded)? post-save does seem to do this with the exception of the last 2 logs (not sure what's up with that).
Thanks again!
hooks The .pre('save') hook works fine, but the .post('save') hook doesn't fire for me.