Skip to content

Update problem for mongoose pre save hooks #16

@berkkarahan

Description

@berkkarahan

Hey,
When updating a resource from admin panel, schema pre-hooks doesn't run.
However, when creating it, it runs perfectly.

This is the message at terminal in my express application,

(node:50219) DeprecationWarning: Mongoose: findOneAndUpdate() and findOneAndDelete() without the useFindAndModify option set to false are deprecated. See: https://mongoosejs.com/docs/deprecations.html#-findandmodify-

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions