You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Constraints that are applied through a hasMany are not applied when that hasMany is used as part of a hasManyThrough.
Minimal repro as follows.
component /*Foo*/ extends="quick.models.BaseEntity" accessors=true {
function a_() {
// we expect this to fail, when run, because someJunkColumn is not a valid column name in the db
return hasMany( relationName = "a_", localKey = "x", foreignKey = "x" ).whereRaw("[someJunkColumn] = 999");
}
function a() {
return hasManyThrough( [ "a_", "alike" ] )
}
}
getInstance("Foo").with("a_").firstOrFail() // as expected, a database error: invalid column [someJunkColumn]
getInstance("Foo").with("a").firstOrFail() // no error, because additional constraints on a_ aren't applied
quick 6.2.0, quick 7.2.0
The text was updated successfully, but these errors were encountered:
Constraints that are applied through a
hasMany
are not applied when that hasMany is used as part of ahasManyThrough
.Minimal repro as follows.
quick 6.2.0, quick 7.2.0
The text was updated successfully, but these errors were encountered: