Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: should editing document trigger change stream event? #788

Open
hasyee opened this issue Aug 22, 2024 · 1 comment
Open

Question: should editing document trigger change stream event? #788

hasyee opened this issue Aug 22, 2024 · 1 comment

Comments

@hasyee
Copy link

hasyee commented Aug 22, 2024

If I edit (Edit Document) and save (Cmd + S) a document from the playground result, it does not trigger any change stream event at all: nor update or replace event. How does the editor update the documents? Is there any special option on this to ignore change stream events?
However if I use a mongosh command on the same document from the playground (eg .updateOne(...)) it works as expected: an update event is generated.

Additional context

VSCode: 1.91.1
Platform: MacOS Darwin arm64 23.5.0
MongoDB for VS Code: 1.7.0

@Anemy
Copy link
Member

Anemy commented Oct 7, 2024

Hi @hasyee
When editing a document and saving, we run findOneAndReplace
Here's where it is in the code:

await dataService.findOneAndReplace(

Which MongoDB version are you on?
Testing this myself I see a operationType: 'replace', event when saving.

Apologies for the late reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants