how to create associations using between two tables that have _many_to_many_ related using the ecto new many_to_many ?
I have one to many relationships from organization to user:
organization = Organization.shortcode_changeset(%Organization{}, org_field) organization = organization |> Repo.insert! organization |> build_assoc(:users)
which gives
%User{__meta__: #ecto.Schema.Metadata<:built, "users">,......} user = Repo.preload(user, [:organization, :usergroup])
How can I do this with many_to_many between users and groups?
source share