Closed
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