hasMany
Defining
// User.cfc
component extends="quick.models.BaseEntity" {
function posts() {
return hasMany( "Post" );
}
}return hasMany("Post", "FK_userID");return hasMany("Post", "FK_userID", "relatedPostId");// Post.cfc
component extends="quick.models.BaseEntity" {
function user() {
return belongsTo( "User" );
}
}Inserting & Updating
save
create
Removing
Last updated
Was this helpful?