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
We have found a regression when trying out the master branch in our app over the last few weeks and haven't managed to fix it yet. Calling Relation#exists? while joining a polymorphic association is broken, as it looks like the binds for the query are wrong. This issue does not happens with 4.1.1/4.1.2.rc2.
This is cased by 03118bc + 9b5d603. The first commit referenced the undefined
local variable `column` when it should be using `reflection.type` as the lookup
key. The second commit changed `build_arel` to not modify the `bind_values` in-
place so we need to combine the arel's `bind_values` with the relation's when
building the SQL.
Fixes#16591
Related #15821 / #15892 / 7aeca50
trungpham
pushed a commit
to trungpham/rails
that referenced
this issue
Sep 18, 2014
This is cased by 03118bc + 9b5d603. The first commit referenced the undefined
local variable `column` when it should be using `reflection.type` as the lookup
key. The second commit changed `build_arel` to not modify the `bind_values` in-
place so we need to combine the arel's `bind_values` with the relation's when
building the SQL.
Fixesrails#16591
Related rails#15821 / rails#15892 / 7aeca50
We have found a regression when trying out the
master
branch in our app over the last few weeks and haven't managed to fix it yet. CallingRelation#exists?
while joining a polymorphic association is broken, as it looks like the binds for the query are wrong. This issue does not happens with 4.1.1/4.1.2.rc2.Here is a script to reproduce the issue. The script also has tests for
.count
and.to_a
with the same join, which are working as expected.I tried to track and fix this one with @kassio and @laurocaetano but we didn't had any luck 🙈.
/cc @rafaelfranca @tenderlove
The text was updated successfully, but these errors were encountered: