【问题标题】:Inheritance mapping in beego?beego中的继承映射?
【发布时间】:2015-03-17 07:20:36
【问题描述】:
【问题讨论】:
标签:
hibernate
inheritance
orm
beego
【解决方案3】:
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
}