Closed felixbuenemann closed 8 years ago
It turns out neither AR 4.0 nor 4.1 use prepared statements for these types of queries. AR 4.0 requires a small fix to avoid ambiguous column in joins, because it does not expand symbols in select()
to fully qualified column names, which can be fixed by selecting the attribute from the arel table instead.
This fixes missing bind values when conditions are on the arel select manager, for example join conditions. This is only used for AR 4.1+ because in AR 4.0 the
arel
has nobind_values
.It's possible that an additional fix is required for AR 4.0 if it does not store all bind values in
relation.bind_values
, we could probably add a test to check this case on all AR versions.TODO: