- All Implemented Interfaces:
- org.codehaus.groovy.grails.commons.metaclass.StaticMethodInvocation, org.grails.datastore.gorm.finders.FinderMethod
public class FindByBooleanPropertyPersistentMethod
extends FindByPersistentMethod
The "findBy*" static persistent method. This method allows querying for
instances of grails domain classes based on a boolean property and any other arbitrary
properties. This method returns the first result of the query.
eg.
Account.findActiveByHolder("Joe Blogs"); // Where class "Account" has a properties called "active" and "holder"
Account.findActiveByHolderAndBranch("Joe Blogs", "London"); // Where class "Account" has a properties called "active', "holder" and "branch"
In both of those queries, the query will only select Account objects where active=true.