Skip to content

Commit

Permalink
fix preload doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Rychlewski authored and Greg Rychlewski committed Dec 19, 2023
1 parent ba2d748 commit 7b1695f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/ecto/repo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1136,9 +1136,10 @@ defmodule Ecto.Repo do
comment1 = TestRepo.preload(comment1, [author: [:permalink]])
TestRepo.preload([comment1, comment2], :author)
The first comment will lose its nested `:permalink` association because
the second comment does not have it preloaded. To avoid this, you must
preload the nested associations as well.
If both comments are associated to the same author, the first comment
will lose its nested `:permalink` association because the second comment
does not have it preloaded. To avoid this, you must preload the nested
associations as well.
If you want to reset the loaded fields, see `Ecto.reset_fields/2`.
Expand Down

0 comments on commit 7b1695f

Please sign in to comment.