Skip to content

Commit 0ee88bf

Browse files
committed
Document know limitation about using references in conjunction with eager loading causing it to ignore custom select clauses.
[ci skip] Fixes rails#24314
1 parent 92e20f3 commit 0ee88bf

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)