Associations
Dot Notation Navigation
// Using virtual services
function findAllAdmins(){
return newCriteria()
.isTrue( "active" )
.eq( "role.slug", "admin" )
.list();
}Joins
/**
* Join an association, assigning an alias to the joined association
*
* You can also use the following alias method : <code>joinTo()</code>
*
* @associationName The name of the association property: A dot-separated property path
* @alias The alias to assign to the joined association (for later reference).
* @joinType The hibernate join type to use, by default it uses an inner join. Available as properties: criteria.FULL_JOIN, criteria.INNER_JOIN, criteria.LEFT_JOIN
* @withClause The criterion to be added to the join condition (ON clause)
*/
any function joinTo(
required string associationName,
required string alias,
numeric joinType=this.INNER_JOIN,
any withClause
)Inner Criterias
Last updated
Was this helpful?