Post #2697 216 Nov 24, 2022, 14:36 UTC #elixirToday I Learned: Composite Primary Keys using Elixir Ecto https://til.hashrocket.com/posts/lgagvwjnev-composite-primary-keys-using-elixir-ecto Hashrocket Today I Learned: Composite Primary Keys using Elixir Ecto Ecto allows us to map a table with composite primary keys into our schemas. The way to do that is by using the primary_key: true option for the Ecto.Schema.field/3 instead of dealing with the special module attr @primary_key. Check this out: