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
Previously it preloaded the through association step by step. To load User#cover_image, it first loads User#latest_post and then Post#cover_image, allowing the latter to use WHERE .. IN loading strategy.
After a415e80 it dispatches a query that directly loads User#cover_image. During the query's construction it demands to check post_image.purpose = 'cover_image', leading to a joined query.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Here is the reproduction script:
Expected behavior
The test passes.
Actual behavior
The test fails with exception
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: post_images
.System configuration
Rails version: 6.0.4
Ruby version: 2.7.3
Bisection points to a415e80 from #39378.
Previously it preloaded the through association step by step. To load
User#cover_image
, it first loadsUser#latest_post
and thenPost#cover_image
, allowing the latter to useWHERE .. IN
loading strategy.After a415e80 it dispatches a query that directly loads
User#cover_image
. During the query's construction it demands to checkpost_image.purpose = 'cover_image'
, leading to a joined query.The text was updated successfully, but these errors were encountered: