mongodb-js / vscode

Connect to MongoDB and Atlas and directly from your VS Code environment, navigate your databases and collections, inspect your schema and use playgrounds to prototype queries and aggregations.
https://marketplace.visualstudio.com/items?itemName=mongodb.mongodb-vscode
Apache License 2.0
326 stars 58 forks source link

Unable to save document #576

Closed erikvallet closed 1 year ago

erikvallet commented 1 year ago

Hi, I can't save a document after edit, in VSCode with your extension : "Unable to save document: command findAndModify is unsupported, correlationID = 1779bcd65584350ee5635308"

My version of MongoDB is upper than the 4.0, so why the extension use findAndModify ?

Thanks to all.

alenakhineika commented 1 year ago

Hey, could you please share with us which exact version of the MongoDB server you are running? Is it localhost or maybe Atlas? And which version of the extension it is?

erikvallet commented 1 year ago

Version of extension : 1.1.0 Mongo version : 6.0.8 In a Atlas server

I would use your extension, it seems to be perfect...

alenakhineika commented 1 year ago

We don't use findAndModify in the extension to save the documents. Trying to consider other ways from where this error could come. Could you describe the steps you are taking that led to this error? Could you try the same Atlass connection in Compass and tell me if it allows you to modify and save documents?

erikvallet commented 1 year ago

In Compass, no problem.

I list my recordings, then click on Edit document : I modify it and type a Ctrl+S.

image

image

alenakhineika commented 1 year ago

Thank you for sharing screenshots! The team will further investigate this unexpected behavior. You can use this ticket to track the progress.

erikvallet commented 1 year ago

Thank you, good job !

alenakhineika commented 1 year ago

Hey, looks like you are connecting to Atlas Data Federation, which is read-only, therefore when you try to edit a document, you get the error. We will update the error message to make it more informative and helpful in cases like this. Thx for reporting the issue!