You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to access all models from a single file so I used the index.js file in the models directory and accessed them like so
this worked with User because it has no associations but when I tried the products table I got an error
the association added a new column for every belongsTo() call so now it's trying to select columns that aren't anywhere in my models, migration or database
Dialect: mysql
Sequelize CLI [Node: 18.12.0, CLI: 6.6.1, ORM: 6.32.1]
The text was updated successfully, but these errors were encountered:
What you are doing?
I wanted to access all models from a single file so I used the index.js file in the models directory and accessed them like so
this worked with User because it has no associations but when I tried the products table I got an error
the association added a new column for every belongsTo() call so now it's trying to select columns that aren't anywhere in my models, migration or database
Dialect: mysql
Sequelize CLI [Node: 18.12.0, CLI: 6.6.1, ORM: 6.32.1]
The text was updated successfully, but these errors were encountered: