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

Upsert operation problem #96

Open
lujiajing1126 opened this issue Feb 6, 2017 · 0 comments
Open

Upsert operation problem #96

lujiajing1126 opened this issue Feb 6, 2017 · 0 comments

Comments

@lujiajing1126
Copy link

I think upsert operation should use a combination of query and update to do the insertion instead of only inserting the update part

reference:

http://docs.spring.io/spring-data/mongodb/docs/1.4.3.RELEASE/reference/html/mongo.core.html

Related to performing an updateFirst operations, you can also perform an upsert operation which will perform an insert if no document is found that matches the query. The document that is inserted is a combination of the query document and the update document.

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

1 participant