Grails gorm如何为每个具体类继承抽象类的每个具体类插入表 [英] How Grails gorm will insert table per concrete class where each concrete class inherits an abstract class
本文介绍了Grails gorm如何为每个具体类继承抽象类的每个具体类插入表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下全部是情况
我有一个抽象类AbstractProfile和一个具体类GoogleProfile
Hi all following is the situation I have an abstract class AbstractProfile and one concrete class GoogleProfile
abstract class AbstractProfile {
.....
}
class GoogleProfile extends AbstractProfile {
......
}
我正在使用grails,但gorm没有为Google配置文件插入表格当前gorm仅为AbstractProfile类插入表格帮助提前致谢
I am using grails but gorm is not inserting table for google profile current gorm is inserting table for only AbstractProfile class please help Thanks in advance
推荐答案
我做了一些挖掘,发现从 grails 2.3 您有以下映射选项:
I did some digging and found out that starting on grails 2.3 you have the following mapping option:
tablePerConcreteClass true
看起来文档(甚至是版本 2.4 )还没有更新过。
It seems the documentation (even for version 2.4) hasn't been updated regarding this yet.
这篇关于Grails gorm如何为每个具体类继承抽象类的每个具体类插入表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文