polymorphicBelongsTo
Usage
// Comment.cfc
component extends="quick.models.BaseEntity" accessors="true" {
function post() {
return polymorphicBelongsTo( "commentable" );
}
}// Post.cfc
component extends="quick.models.BaseEntity" accessors="true" {
function comments() {
return polymorphicHasMany( "Comment", "commentable" );
}
}Signature
Visualizer
Last updated
Was this helpful?