This example displays MongoDB querying on multiple fields with multiple filters on any given field using grails MongoDB Plugin.
Fetch all the people who have their lastName as "spencer" but their firstName must not be 'Mark' with salary between 10000 and 30000.
Person.collection.find('
Note:
We need to use single quotes while writing $gt, $ne, $lt etc because if we use double quote then grails tries to evalue $gt and hence results in error
No comments:
Post a Comment