Forum

Error: .belongsToMa...
 
Powiadomienia
Wyczyść wszystko

Error: .belongsToMany called with something that's not a subclass of Sequelize.Model5

1 Wpisy
1 Użytkownicy
0 Reactions
1,570 Widoki
0
Rozpoczynający temat

can't create table

1 odpowiedź
0
Rozpoczynający temat

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'});

Twoja odpowiedź

Nazwa autora

E-mail autora

Twoje zapytanie *

Podgląd 0 rewizje Zapisano
Udostępnij: