egg + ts报错${this.name}.hasMany
“
egg+ts+Sequelize写项目关联表的时候报错${this.name}.hasMany called with something that's not a subclass of Sequelize.Model
”
今天用egg+ts+Sequelize写项目关联表的时候报错 ${this.name}.hasMany called with something that's not a subclass of Sequelize.Model
${this.name}.hasMany called with something that's not a subclass of Sequelize.Model
解决方法:
需要把关联的语句放在associate里面
1