hasManyThrough
// User.cfc
component extends="quick.models.BaseEntity" {
function permissions() {
return hasManyThrough( "Permission" );
}
}// Permission.cfc
component extends="quick.models.BaseEntity" {
function users() {
return hasManyThrough( "User" );
}
}// UserPermission.cfc
component extends="quick.models.BaseEntity" {
function user() {
return belongsTo( "User" );
}
function permission() {
return belongsTo( "Permission" );
}
}Last updated
Was this helpful?