Say I have this for retrieving all threads:
Thread |> Thread.ordered |> Repo.all |> Repo.preload([:posts])
How can I provide an order_by clause for :posts? I cannot find anything in the documentation that refers to Ecto.Repo.preload/1, so none of the above examples is useful for figuring out how to use this syntax correctly.
source
share