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
I've been having deadlock issues around the :order scope being cleared in aal updates (e.g. shuffling the table) vs other updates where the default_scope is kept intact.
What do you think about just calling: .unscope(:where) instead? Are there other scope types we'd need to unscope? I don't think there is as we really only want to make sure that our .where clauses are the only ones in there.
Hi @brendon, I think you are right, .unscope(:where) should be enough, but it will mean to drop compatibility with rails 3 since that method is only available with rails >= 4.0.
Maybe except could help to preserve rails 3 compatibility.
I've had good success with this PR. Let's see how the CI runs for all scenarios. I had to .reorder instead of .order but again, that's less of a blunt instrument.
Hi @fabn, I was wondering if you could travel back in time and give a bit more detail as to your intention with this commit?:
4a45dca
I've been having deadlock issues around the
:order
scope being cleared inaal
updates (e.g. shuffling the table) vs other updates where thedefault_scope
is kept intact.What do you think about just calling:
.unscope(:where)
instead? Are there other scope types we'd need to unscope? I don't think there is as we really only want to make sure that our.where
clauses are the only ones in there.What do you think @swanandp?
The text was updated successfully, but these errors were encountered: