-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type
Description
Model.hasMany(AnotherMmodelWithHasManyAssociations, { onDelete: 'CASCADE', as: 'test' });Model.findAll({
include: [
{
model: AnotherMmodelWithHasManyAssociations,
as: 'test',
separate: true,
},
],
})After that Sequelize falls with error:
TypeError: Cannot read property 'push' of undefined
at /usr/src/app/node_modules/sequelize/lib/associations/has-many.js:331:64
at Array.forEach (native)
at .<anonymous> (/usr/src/app/node_modules/sequelize/lib/associations/has-many.js:330:13)
From previous event:
at Promise.then (/usr/src/app/node_modules/sequelize/lib/promise.js:21:17)
at HasMany.get (/usr/src/app/node_modules/sequelize/lib/associations/has-many.js:322:33)
at /usr/src/app/node_modules/sequelize/lib/model.js:1442:32
From previous event:
at Function.map (/usr/src/app/node_modules/sequelize/lib/promise.js:21:17)
at Function.Model.$findSeparate (/usr/src/app/node_modules/sequelize/lib/model.js:1420:18)
at .<anonymous> (/usr/src/app/node_modules/sequelize/lib/model.js:1408:18)
From previous event:
at Promise.then (/usr/src/app/node_modules/sequelize/lib/promise.js:21:17)
at Promise.all.then (/usr/src/app/src/modules/transaction/limits.service.js:139:10)Dialect: mariaDb
Database version: 10.1
Sequelize version: 3.30.4
xdroidx, BotanMan, sluchznak, ezze, friend0 and 13 more
Metadata
Metadata
Assignees
Labels
type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type