Skip to content

Please add the watch functionality too #2

@kasir-barati

Description

@kasir-barati

Hi, you miss the watch/change stream functionality. please add it. When I do this:

const userChangeStream = UserModel.watch();

userChangeStream.on('change', async (doc) => {
     if (doc.operationType === 'update') {
          console.log(doc.documentKey._id.toHexString()); // Object is of type 'unknown'.
     }
}

What can I do?

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