像hibernate这样的beego中的继承映射是什么?https://docs.jboss.org/hibernate/orm/3.5/reference/en-US/html/inheritance.html
beego文档(http://beego.me/docs/mvc/model/orm.md)中没有文档。
像这样的类:
学生扩展人
教师延伸人
发布于 2015-10-08 17:19:19
我认为beego orm还不支持。https://github.com/astaxie/beego/issues/1389这是一个更简单的问题。
发布于 2016-09-07 00:17:24
Beego ORM目前还不支持。如果你真的需要的话。您可以尝试GORM http://jinzhu.me/gorm/。
发布于 2016-07-28 17:02:37
There is no features like this yet there is an alternative solution
where you can import your controller into another controller.
ex - In ControllerA
type ControllerA struct {
ControllerB
}
func (this *ControllerA) Test() {
res := this.DoSomething("Asdasd")
fmt.Println(res)
}
In Controller B
type ControllerB struct {
beego.Controller
}
func (this *ControllerB) DoSomething(name string) string{
return name
}
https://stackoverflow.com/questions/29093372
复制相似问题