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
关注公众号获取更多内容
暂无评论,快抢沙发吧




