Posts by Rad Aragón • 46 points
4 posts
-
1
votes1
answer1369
viewsA: Double association with sequelize
I believe this is not the ideal way to define relationships, describing the foreignKey at this point in time. Examples of Sequelize often do: const User = sequelize.define('User') // campo id é…
-
0
votes1
answer80
viewsA: Error in separating responsibilities
The first problem is that the sequelize that you should use when defining the models is the configured instance with the seat and not the static class. Example: const Sequelize =…
-
0
votes1
answer245
viewsA: beforeupdate sequelize does not work
The beforeUpdate depends on the way the update is performed, because it only works on instance.save() or instance.update(values). To model.update(values, options) utilize beforeBulkUpdate.…
-
2
votes2
answers620
viewsA: Where em Join - Sequelize
I’ll put it in context with the models: const Tab1 = sequelize.define('tab1', { name: sequelize.STRING, tab2_id: sequelize.INTEGER }) const Tab2 = sequelize.define('tab2', { title: sequelize.STRING…