Skip to content

Remove _id from documents during update if the document contains update operator modifiers - #243

Closed
szs8 wants to merge 1 commit into
mongodb:masterfrom
szs8:master
Closed

szs8 wants to merge 1 commit into
mongodb:masterfrom
szs8:master

Conversation

@szs8

@szs8 szs8 commented Sep 20, 2014

Copy link
Copy Markdown

This is necessary because updating docs with manipulate=True, inserts
a new object id causing OperationalError on the server.

update modifier (which implies that only a portion of the doc is being
updated).

This is necessary because updating docs with manipulate=True, inserts
a new object id causing OperationalError on the server.
@behackett

Copy link
Copy Markdown
Member

What version of PyMongo are you using? PyMongo 2.7 removed the use of son manipulators to inject _id fields during inserts, so this should no longer be a problem. See this commit:

9a7b748

@behackett behackett closed this Sep 20, 2014
@szs8

szs8 commented Sep 20, 2014

Copy link
Copy Markdown
Author

Damn, I must have been using an old version. Sorry about this. I spent a frustrating part of last couple of hours debugging this issue!

On Sep 19, 2014, at 9:40 PM, Bernie Hackett [email protected] wrote:

Closed #243.

—
Reply to this email directly or view it on GitHub.

@behackett

Copy link
Copy Markdown
Member

No worries. Sorry about the confusion.

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

Successfully merging this pull request may close these issues.

2 participants