hasManyDeep
Usage
// Team.cfc
component extends="quick.models.BaseEntity" accessors="true" {
function posts() {
return hasManyDeep(
relationName = "Post",
through = [ "User" ],
foreignKeys = [
"teamId", // the key on User that refers to Team
"authorId" // the key on Post that refers to User
],
localKeys = [
"id", // the key on Team that identifies Team
"id" // the key on User that identifies User
]
);
}
}Constraining Relationships
Signature
Was this helpful?