Is there a way to create a query in a grails domain that always returns the records that have a specific criteria?
For example:
Class Person {
String firstname
String lastname
}
Now instead of saying Person.findByFirstname("Bart")
all over the codebase is there anything I can do inside the Person
domain class so that I can simply say something like Person.bart