Skip to content

How to track fields changes at update? #4811

@gugadev

Description

@gugadev

I have a User schema with a path email. I want track changes over this field, so, when the user changes his email, a job is executed. Which is the way to do it with mongoose, since the update hooks pass a Query instead a Document (can't use isModified(path))?

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