Fix regression on eager loading association based on SQL query rather
than existing column.

Fixes #15480.
Merge pull request #15482 from laurocaetano/fix-regression-for-eager-load

Fix regression on eager loading association based on SQL query rather than existing column.

Conflicts:
	activerecord/CHANGELOG.md