ERROR:beego v2 版本创建多对多关系表时会出现call of reflect.Value.MethodByName on zero Value
windows系统下,使用最新版本beego v2 创建多对多关系表时报错:
call of reflect.Value.MethodByName on zero Value
数据库创建无问题
// User table 用户表,与用户组表多对多关系
type User struct {
Id int
UserName string `orm:"unique"`
Department string
Email string
Groups []Group `orm:"rel(m2m)"` //多对多
}
//
原创
2021-04-26 16:35:02 ·
1042 阅读 ·
0 评论