hasMany
Usage
// User.cfc
component extends="quick.models.BaseEntity" accessors="true" {
function posts() {
return hasMany( "Post" );
}
}return hasMany( "Post", "FK_userID" );return hasMany( "Post", "FK_userID", "relatedPostId" );// Post.cfc
component extends="quick.models.BaseEntity" accessors="true" {
function user() {
return belongsTo( "User" );
}
}Inserting & Updating
save
saveMany
create
Removing
Relationship Setter
Signature
Name
Type
Required
Default
Description
Visualizer
Last updated
Was this helpful?