Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.


Define a One-to-Many Relationship Using Sequelize Associations

Let's start with defining the relationship from the "many" side, by adding a one-to-many association to the Person model.

<div class="secondary box"> <strong>Note:</strong> To get the most out of instruction steps, be sure to write all of your code and avoid copying/pasting from the examples. </div>

  1. Open the db/models/person.js file. The Person model currently looks like this...