Complete the code to define a one-to-many association where a User has many Posts.
User.[1](Post);In Express with Sequelize, hasMany sets a one-to-many relationship from User to Post.
Complete the code to define the inverse association where a Post belongs to a User.
Post.[1](User);The belongsTo method sets the inverse of a hasMany association, linking Post back to User.
Fix the error in the association code to correctly link Comment to Post.
Comment.[1](Post);Each Comment belongs to one Post, so belongsTo is the correct association method.
Fill both blanks to create a bidirectional association between Author and Book.
Author.[1](Book); Book.[2](Author);
Authors can have many Books (hasMany), and each Book belongs to one Author (belongsTo).
Fill all four blanks to define a many-to-many association between Student and Course using Enrollment.
Student.[1](Course, { through: Enrollment }); Course.[2](Student, { through: Enrollment }); Enrollment.[3](Student); Enrollment.[4](Course);
Many-to-many associations use belongsToMany on both models with a join table. The join table belongsTo each model.