-
Sep 20th, 2011, 02:47 PM
#1
Example of using elemMatch criteria
How would one write this query using spring-data-mongo?
> db.temp.find({b: {$elemMatch: {$gte: 4, $lte: 5}}})
I am trying:
Criteria rangeValuesCriteria = new Criteria("b").elemMatch(new Criteria("b").gte(4).and("b").lte(5));
but that's coming out as:
"b" : { "$elemMatch" : { "b" : { "$lte" : 5}}}
Any help is greatly appreciated!
Cheers
bjorn
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules