Work with Associations

Learn how to work with associations.

So far, all of our changesets have used a single schema. However, we’ll often need to update associated records as well as parent records at the same time. Ecto provides several options for updating associated records, each serving a particular purpose depending on where our data is coming from and how we want it updated. This section will look at how we can insert and update Artist records and associated Album records.

Updating a single associated record

When making changes to child records, ...