Implement CASCADE delete for mongoose models without changing the modular structure of models as separate files.
#8 fixes the issue but needs restructuring the code (need to have the model definition of dependent and independent models together). Approach used in #8 : mongoose's remove middleware; eg - https://stackoverflow.com/questions/14348516/cascade-style-delete-in-mongoose
Implement
CASCADEdelete formongoosemodels without changing the modular structure of models as separate files.#8 fixes the issue but needs restructuring the code (need to have the model definition of dependent and independent models together). Approach used in #8 : mongoose's
removemiddleware; eg - https://stackoverflow.com/questions/14348516/cascade-style-delete-in-mongoose