subQuery .from()
references wrong table (regression from v4 to v6)
#231
Labels
.from()
references wrong table (regression from v4 to v6)
#231
We had an entity with the following scope in Quick 4:
which emitted this (focus is on the
whereIn()
portion withwhere [clientID] = @P4
In Quick 6/7, it does this:
This appears to occur only when both the parent object and the subQuery
.from()
table contain the same column: the builder references the parent table's column even with an explicit.from()
A workaround is to avoid
.whereIn()
in favor of additional.whereHas()
but this is a prickly one as it's tough to track down unless you're explicitly testing for valid results in these queries.The text was updated successfully, but these errors were encountered: