Error: .belongsToMany called with something that's not a subclass of Sequelize.Model5« Wróć do listy pytań

can't create table
Wysłane przez mrmucha
Zadane przez 03/12/2019 20:41
0

if you’re using objects instead of string-names the you should replace

Project.belongsToMany('User', {through: 'UserProject'});
User.belongsToMany('Project', {through: 'UserProject'});

with

Project.belongsToMany(this.User, {through: 'UserProject'});
User.belongsToMany(this.Project, {through: 'UserProject'});
Wysłane przez mrmucha
Odpowiedziane 03/12/2019 20:43