preloading associations in elixir

Developer from somewhere

Repo.get(User, 1) |> Repo.preload(:association_name)

or, if an association has not been loaded, and you receive: #Ecto.Association.NotLoaded</b> then, the following works too:

u = Repo.get(User, 1)
p = Repo.preload(u, :association_name)