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
The SQL queries resulting from model iterator for the above model will end up having this clause:
ORDER BY created_at DESC, id asc
Because the order is messed up right now, @current_id won't be properly maintained and the iterator will go through many more iterations of overlapping sets of records than it's needed.
The solution would be to ensure that the default_scope order is never inherited.
Take this example default scope:
The SQL queries resulting from model iterator for the above model will end up having this clause:
Because the order is messed up right now,
@current_id
won't be properly maintained and the iterator will go through many more iterations of overlapping sets of records than it's needed.The solution would be to ensure that the
default_scope
order is never inherited./cc @ptoomey3
The text was updated successfully, but these errors were encountered: