I have a schema with a composite foreign key which looks like this,
has_many :name_a, AllIAsk.Model, references: :a, foreign_key: :a has_many :name_b, AllIAsk.Model, references: :b, foreign_key: :b:
with a normal foreign key, I could use
Ecto.assoc, like this,
model |> ( Ecto.assoc :name_normal_fk ) |> AllIAsk.Repo.one
What’s the best way to do this with a composite foreign key though?