Skip to content

DATAMONGO-471 - Add support for '$each' when using '$addToSet'. #157

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

Closed
wants to merge 2 commits into from

Conversation

christophstrobl
Copy link
Member

Additionally to addToSet(String, Object) the method addToSet(String) has been introduced, returning a Builder allowing creation of $addToSet command for either single value, or multiple values using $each.

Using value:

new Update().addToSet("key").value("spring");

Using each:

new Update().addToSet("key").each("spring", "data", "mongodb");

Additionally to 'addToSet(String, Object)' the method 'addToSet(String)' has been introduced, returning a 'Builder' allowing creation of $addToSet command for either single value, or multiple values using $each.

Using value:
new Update().addToSet("key").value("spring");

Using each:
new Update().addToSet("key").each("spring", "data", "mongodb");

Original Pull Request: #157
christophstrobl added a commit that referenced this pull request Mar 31, 2014
Additionally to Update.addToSet(String, Object) the method 'addToSet(String)' has been introduced, returning a builder to allow the creation of $addToSet command for either single value, or multiple values using $each.

Using value:
new Update().addToSet("key").value("spring");

Using each:
new Update().addToSet("key").each("spring", "data", "mongodb");

Original Pull Request: #157.
@odrotbohm odrotbohm closed this Mar 31, 2014
@odrotbohm odrotbohm deleted the issue/DATAMONGO-471 branch March 31, 2014 13:26
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