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]
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]