我想为 3 个域类创建 3 个单独的表:A、B 扩展 A、C 扩展 B
但我希望他们的表不相互连接。
在hibernate中,我会使用InheritanceType.TABLE_PER_CLASS,在grails中,等价物是什么?
尝试使用tablePerHierarchy false
class Payment {
Integer amount
static mapping = {
tablePerHierarchy false
}
}
class CreditCardPayment extends Payment {
String cardNumber
}
查看更多 :http://grails.org/doc/latest/guide/single.html#5.5.2.3%20 继承%20 策略 http://grails.org/doc/latest/guide/single.html#5.5.2.3%20Inheritance%20Strategies
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)