Versions
I'm submitting a ...
[x ] bug report
[ ] feature request
Actual behavior:
I'm getting a type error when I try and define a relationship between Models
Expected behavior:
Being able to define relationships as per the docs and examples
Related code:





Hi @Evanion, this is the same issue at lot of people are having here. I have commented on issue #813 this:
I have this same issue. Could resolve this by removing the type constructor (
<Questions>,<Options>).In my case I had a QuestionsAttributes interface and had to change:
class TalentData extends Model<TalentData, TalentDataAttributes>to:
class TalentData extends Model implements TalentDataAttributesBut this really appears to be a sequelize-typescript error.
@RobinBuschmann any thoughts on that?
I had this same issue this morning and cross-compared my current project against one that was still working. I noticed I had a few modules with later versions, especially Typescript, Sequelize itself, and some of the @types incudes, so I downgraded them and this resolved the problem.
For reference, this is working for me. Later versions of Sequelize and other deps are not:
"dependencies": {
"mysql2": "^2.1.0",
"reflect-metadata": "^0.1.13",
"sequelize": "^5.22.2",
"sequelize-typescript": "^1.1.0"
},
"devDependencies": {
"@types/sequelize": "^4.28.9",
"@types/bluebird": "^3.5.32",
"@types/validator": "^13.0.0",
"@types/node": "^14.0.13",
"typescript": "^3.9.5"
},
Yeah, having similar issue. Downgraded from v 6 to "sequelize": "^5.22.2" and error disappeared.
+1 Getting the same error. Downgrading to 5.22.2 also resolved the issue for me.
Same here, a fix would be great
Most helpful comment
Same here, a fix would be great