Reputation: 41158
Is there a way to qualify method parameters versus domain properties in a Grails where query criteria when they are named identically?
For example:
def getPeople(age, sex) {
People.find { age == age && sex == sex }
}
Upvotes: 3
Views: 234
Reputation: 5540
Something like this!?
def getPeople(age, sex) {
People.find { delegate.age == age && delegate.sex == sex }
}
Upvotes: 1