Posts by Lucas Oliveira Mota • 1 point
2 posts
-
0
votes1
answer173
viewsA: Sequelize Associantions
Friend, if it was a Model sequelize class you would have to extend it to Model, I believe that why Sequelize is not understanding that user_features is a sequelize model. Here is an example of the…
-
0
votes1
answer503
viewsA: How to delete a record with a foreign key using sequelize
You are passing primaryKey and not the foreign key, so the problem, how I imagine it will work: Product.destroy({ where: { idCategory: req.body.id } }) .then(() => { res.redirect('/produto')…