These are chat archives for Automattic/mongoose
In document middleware functions, this refers to the document.
In query middleware functions, this refers to the query.
does anyone know how to get the document in the "update" pre hook middleware? using this gets the query only, but i want the document like in the "save" middleware.
CastErroris but I can't find anything definitive. Please can someone point me to a useful resource, thanks
find node_modules/mongoose/lib -type f | xargs grep 'throw new CastError'