Well, in this case I would prefer:
User |> where(email: "email") |> preload(:posts) |> Repo.one()
As it can reduce amount of queries and round trips.
Well, in this case I would prefer:
User |> where(email: "email") |> preload(:posts) |> Repo.one()
As it can reduce amount of queries and round trips.