Skip to content

Commit 67d0c9e

Browse files
authored
Merge pull request rails#24476 from vipulnsward/24314-eagerloading-doc-update
Document know limitation about using `references` in conjunction with custom select clauses [ci skip]
2 parents c5fb8b1 + 0ee88bf commit 67d0c9e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

guides/source/active_record_querying.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,8 +1251,9 @@ articles, all the articles would still be loaded. By using `joins` (an INNER
12511251
JOIN), the join conditions **must** match, otherwise no records will be
12521252
returned.
12531253

1254-
1255-
1254+
NOTE: If an association is eager loaded as part of a join, any fields from a custom select clause will not present be on the loaded models.
1255+
This is because it is ambiguous whether they should appear on the parent record, or the child.
1256+
12561257
Scopes
12571258
------
12581259

0 commit comments

Comments
 (0)