Has_many through load selected associated columns

select can do it in “one go” as well.

user |> Ecto.assoc(:chatrooms) |> select([cr], map(cr, [:id, :name])) |> Repo.all()