O'Reilly logo

Programming Phoenix by Jose Valim, Bruce Tate, Chris McCord

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6Generators and Relationships

So far, our look at Ecto has been pretty basic. We’ve fetched and written data to the repository, but we still haven’t connected any models together. Relational databases like Postgres are named that way for a reason. Dealing with related data is the defining characteristic of that whole family of databases, so management of relationships is the feature that makes or breaks any persistence layer. This chapter takes you on a deeper dive into Ecto by exploring how to tie our schemas together in the database. We’ll use code generators to accelerate the process, and you’ll walk through what these generators do for us.

When you’re through, you’ll know how to take greater advantage of some of the code generators ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required