David Rogers
02/14/2023, 4:32 PMDavid Rogers
02/14/2023, 4:32 PMscopeWhereFoo() { ... }
instance.whereFoo().get(); // easy peasy
instance.withIfWhereFooIsTrueThenTrueElseFalse() // ???David Rogers
02/14/2023, 4:33 PMDavid Rogers
02/14/2023, 4:49 PMfunction selfJoinFoo() {
return hasOne(
relationName = "<this>",
foreignKey = "<this-key>",
localKey = "<this-key>"
).whereFoo()
}
function scopeWithFooIsTrue() {
withCount( "selfJoinFoo as fooIsTrue" )
}