type User struct {
Id int
Name string
Profile *Profile orm:"rel(one)" // OneToOne relation
Post []*Post orm:"reverse(many)" // 设置一对多反向关系
}
type Profile struct {
Id int
Age int16
User *User orm:"reverse(one)" // 设置一对一反向关系(可选)
}
报错内容:sql.go sqlorm.(*SqlGenerator).getStructFieds:132 ▶ filed Profile not supported, ignore sql.go sqlorm.(*SqlGenerator).getStructFieds:132 ▶ filed Post not supported, ignore