I am trying to make a big query with many joins and it seems sequelize doesn't like the way I am doing this.
const ids = [/*Some integer here*/];
models.Exercise.findAll({
// no need for that part here
attributes: [
"id",
"title",
"description",
"version",
"createdAt",
"updatedAt"
],
where: {
id: {
[Op.in]: ids
}
},
include: [
// load exercise evaluation
{
models: models.Exercise_Metrics,
as: "metrics",
attributes: [
["vote_count", "votes"],
["avg_vote_score", "avg_vote"]
]
},
// load tags linked to this exercise ( with their category included )
{
models: models.Exercise_Tag,
as: "tags",
attributes: [],
include: [
{
models: models.Tag,
attributes: ["id", "text"],
include: [
{
models: models.Tag_Category,
as: "category",
attributes: [
["kind", "category"],
["id", "category_id"]
]
}
]
}
]
}
]
});
I expect that to work when I use findAll
Error: Include unexpected. Element has to be either a Model, an Association or an object.
at Function._conformInclude (D:\workspaceshit\exercises_library\node_modules\sequelize\lib\model.js:390:11)
at options.include.options.include.map.include (D:\workspaceshit\exercises_library\node_modules\sequelize\lib\model.js:326:59)
at Array.map (<anonymous>)
at Function._conformIncludes (D:\workspaceshit\exercises_library\node_modules\sequelize\lib\model.js:326:39)
at Function._baseMerge (D:\workspaceshit\exercises_library\node_modules\sequelize\lib\model.js:791:10)
at Function._defaultsOptions (D:\workspaceshit\exercises_library\node_modules\sequelize\lib\model.js:828:17)
at Function._injectScope (D:\workspaceshit\exercises_library\node_modules\sequelize\lib\model.js:3288:10)
at Promise.try (D:\workspaceshit\exercises_library\node_modules\sequelize\lib\model.js:1707:12)
at tryCatcher (D:\workspaceshit\exercises_library\node_modules\bluebird\js\release\util.js:16:23)
at Function.Promise.attempt.Promise.try (D:\workspaceshit\exercises_library\node_modules\bluebird\js\release\method.js:39:29)
at Function.findAll (D:\workspaceshit\exercises_library\node_modules\sequelize\lib\model.js:1706:23)
Here are my models definitions if It could help you :
Exercise
Exercise_Metrics
Exercise_Tag
Tag
Tag_Category
I made a typo : models instead of model
Sorry for the issue
Hi so it's caused by your typo? I also have this issue, but don't know why :(
@JasmineGe did you figure it out?
same issue
Same issue
same issue
Same Issue
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I had the issue but it was because i did not use the proper name for the model name use that i defined it as
in my model i defined it as sequelize.define('houseLocation'
and in query i had lower "l"
include: [
{
model: db.houselocation,
required: true
}
],
Once i used the correct case as I had in the in model then it work. Check the name you gave it in the define bit in the model and check your case
include: [
{
model: db.houseLocation,
required: true
}
],
I just had the same issue and double checked the name of my models. They were wrong. This solved my issue.
@jy95 thanks, you saved my time with simple 'as' property
include: [{model: Products, as: 'products', attributes: ['name_product']}],
Most helpful comment
I made a typo :
modelsinstead ofmodelSorry for the issue