egg + ts报错${this.name}.hasMany

2020-11-16 20:31
2666
0
1
Node.js

“ 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
关注公众号获取更多内容
uniapp去掉安卓启动提示存储权限
使用vue3.0+ts写一个简单的插件
暂无评论,快抢沙发吧
不支持canvas