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

2020-11-16 20:31
2474
0
1

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
关注公众号获取更多内容
使用vue3.0+ts写一个简单的插件
结合lazyload实现文章页里面的图片预加载
暂无评论,快抢沙发吧
不支持canvas
春季
夏季
秋季
冬季
暗黑
简约
小清新