Added support for 'findOneAndUpdate' and 'update' with upsert#9
Closed
linusbrolin wants to merge 6 commits intoramiel:developfrom
Closed
Added support for 'findOneAndUpdate' and 'update' with upsert#9linusbrolin wants to merge 6 commits intoramiel:developfrom
linusbrolin wants to merge 6 commits intoramiel:developfrom
Conversation
Helps people who are newer to use the project ramiel#3
Added require on readme
This will make the sequence plugin work with upsert operations.
Unfortunately it seems there is no way to know in the query if an upsert will result in an insert or update, according to this mongoose issue: Automattic/mongoose#2118 So the only way to know is to make another query to find out.
…al update query This should prevent any possible error due to undefined _id in the _update object
Author
|
Alright, so I think I've solved everything now. |
Owner
|
Ok, perfect. I added some tests and done a little roadmap to have this properly working. |
Author
|
Cool, thanks. :) |
|
any update on this ? Still not working |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per request, made a PR against the develop branch instead of master.