Add a test case for preloading through association with implicit source
If `reflection_scope.where_clause` is not empty, `through_scope` should be joined the source association. But if the through association doesn't have explicit `:source`, `options[:source]` will be nil and `scope.includes_values` will also be empty. It should use `source_reflection.name` rather than `options[:source]`. Fixed by a26cff3c. Fixes #11078. Fixes #26129. Closes #14312. Closes #29155. Closes #29841.
Showing
想要评论请 注册 或 登录