I want to use here a column of the table Class5 using this line:
'$Class5.time$': filter
But the error manager says:
TS2769: No overload matches this call.
Overload 1 of 2, '(this: ModelStatic, options: NonNullFindOptions): Promise', gave the following error.
Type '{ id: string; '$Class5.time$': filter; }' is not assignable to type 'WhereOptions'.
Object literal may only specify known properties, and ''$Class5.time$'' does not exist in type 'WhereOptions'.
Overload 2 of 2, '(this: ModelStatic, options?: FindOptions): Promise', gave the following error.
Type '{ id: string; '$Class5.time$': { [sequelize.Op.col]: string; }; }' is not assignable to type 'WhereOptions'.
Object literal may only specify known properties, and ''$Class5.time$'' does not exist in type 'WhereOptions'.
Here's my full code:
rejectOnEmpty: undefined,
include: [
{
model: Class1,
include: [
{
model: Class2, i
nclude: [
{
model: Class3,
where: { },
include: [
{
model: Class4,
include: [
{
model: Class5,
where: { },
include: [
{
model: Class6,
required: true
}
]
}
]
}
]
}
]
}
]
}
],
where: {
id: id,
'$Class5.time$': filter
},
I've found something nearly similar on this question, but it didn't work for me.