Skip to content

DATAMONGO-847 - Allow usage of Query for Update $pull. #172

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

In case we detect Query within a value used for an Update value we map the query itself to build the expression to use. This allows to form query statements for eg. $pull using the same API as for the query itself.

Update update = new Update().pull("list", query(where("value").in("foo", "bar")));

In case we detect `Query` within a value used for an `Update` value we map the query itself to build the expression to use. This allows to form query statements for eg. `$pull` using the same API as for the query itself. 

Update update = new Update().pull("list", query(where("value").in("foo", "bar")));

Original Pull Request: #172
christophstrobl added a commit that referenced this pull request Apr 28, 2014
In case we detect Query within a value used for an Update value we map the query itself to build the expression to use. This allows to form query statements for e.g. $pull using the same API as for the query itself.

Update update = new Update().pull("list", query(where("value").in("foo", "bar")));

Original Pull Request: #172.
@odrotbohm odrotbohm closed this Apr 28, 2014
@odrotbohm odrotbohm deleted the issue/DATAMONGO-847 branch April 28, 2014 11:30
christophstrobl added a commit that referenced this pull request Apr 28, 2014
In case we detect Query within a value used for an Update value we map the query itself to build the expression to use. This allows to form query statements for e.g. $pull using the same API as for the query itself.

Update update = new Update().pull("list", query(where("value").in("foo", "bar")));

Original Pull Request: #172.
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