hasManyThrough
Usage
// User.cfc
component extends="quick.models.BaseEntity" accessors="true" {
function permissions() {
return hasManyThrough( [ "userPermissions", "permission" ] );
}
function userPermissions() {
return hasMany( "UserPermission" );
}
}// Permission.cfc
component extends="quick.models.BaseEntity" accessors="true" {
function users() {
return hasManyThrough( [ "userPermissions", "user" ] );
}
function userPermissions() {
return hasMany( "UserPermission" );
}
}Signature
Last updated
Was this helpful?