findAndModify and update with upsert=true, empty update returns MongoError against 2.6 #2065

Open
vkarpov15 opened this Issue May 8, 2014 · 0 comments

Projects

None yet

1 participant

@vkarpov15
Collaborator

Related to https://jira.mongodb.org/browse/SERVER-12266 . The below commit:

c1efafb

minimizes the impact, but there's still one case where 2.6 will fail but 2.4 will succeed, something like:

Model.findOneAndUpdate({ _id: s._id }, { }, { upsert: true }, function(error, document) {}

will fail against MongoDB 2.6.x . Worth making this a backwards-breaking change in mongoose 4.0 unless this server behavior changes.

@vkarpov15 vkarpov15 added the 4.x label May 8, 2014
@vkarpov15 vkarpov15 self-assigned this May 8, 2014
@vkarpov15 vkarpov15 removed the 4.x label Feb 10, 2015
@vkarpov15 vkarpov15 removed their assignment Feb 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment