python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Sequelize Insert transaction (two tables, multiple rows)
Two tables: post and post_resources.
The logic I want to implement:
Whenever I add data to post table, I want to add resources as well to the post_resources table, with the same foreign key of PostId
...
Mr Smiley
Votes: 0
Answers: 1
MySQL + Sequelize - tables was created with a capital letter, but Sequelize generate query with a lower letter
I have such Sequelize migration:
await queryInterface.createTable("Organizations", { ...
but in some moments the Sequelize generated request in this way:
ALTER TABLE `organizations`...
wit...

Vladimir Mironov
Votes: 0
Answers: 1
not null violation: model.field cannot be null
I have sequelize models and everything is synced up with the db:
supplier:
class Suppliers extends Model {}
Suppliers.init({
id: {
type: DataTypes.UUID,
defaultValue: DataTypes.UUIDV4,...
Abdulsalam Almahdi
Votes: 0
Answers: 1
How to perform chaining in sequelize association?
Suppose i have 3 models.
Model 1: (author)
hasMany: books
Model 2: (book)
belongsTo: author
hasOne: category
foreign key: authorId
Model 3: (category)
belongsTo: book
foreign key: bookId
Now if i do,
...

abhisek mishra
Votes: 0
Answers: 1