FAQ
What's the difference between `posts()` and `getPosts()`?
getInstance( "Post" )
.where( "userId", prc.loggedInUser.getId() )
.findOrFail( rc.id );prc.loggedInUser.posts().findOrFail( rc.id );// User.cfc
component extends="quick.models.BaseEntity" {
function posts() {
return hasMany( "Post" );
}
function publishedPosts() {
return this.posts().whereNotNull( "publishedDate" );
}
}Can I access qb to run an SQL statement?
What's the difference between retrieveAttribute( "x" ) and getX()?
When do I use a scope method and when do I use a normal method?
I keep getting a `QuickEntityNotLoaded` exception. What is the difference between a loaded entity and an unloaded entity?
How can I add a subselect field to my entity?
How can I add a computed field to my entity, like from a SQL CASE statement?
How can I always add a subselect or computed field to my queries?
Last updated
Was this helpful?