-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
in: coreIssues in core supportIssues in core supportstatus: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement
Milestone
Description
Sergey Alaev opened DATAMONGO-317 and commented
To create query {$or: [{'a': 1}, {'b', 2}]} I need to write following code:
Criteria crit1 = Criteria.where("a").is(1);
Criteria crit2 = Criteria.where("b").is(2);
Query query = Query.query(new Criteria().orOperator(crit1, crit2));
I believe it is a good idea to add static or/and factory methods to cover above case and provide a simple way to convert Critera to Query
Something like that:
Query query = Criteria.or(authorCrit, workersCrit).query();
Affects: 1.0 M5
2 votes, 3 watchers
Metadata
Metadata
Assignees
Labels
in: coreIssues in core supportIssues in core supportstatus: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement