【发布时间】:2012-04-10 07:35:30
【问题描述】:
我正在使用 hbm 文件(以保留没有注释的纯 pojo 类)并且我想使用具有技术信息(id、创建/修改日期和用户)的超类作为 @mappedclass 注释。
<hibernate-mapping>
<class name="AbstractEntity" abstract="true">
<id name="entityId"></id>
<!-- Id overridé dans les classes filles -->
<property name="userCreation" type="string">
<column name="USR_LOG_I" length="20" not-null="true" />
</property>
<property name="dateCreation" type="timestamp">
<column name="DTE_LOG_I" length="26" not-null="true" />
</property>
<property name="userModification" type="string">
<column name="USR_LOG_U" length="20" not-null="true" />
</property>
<property name="dateModification" type="timestamp">
<column name="DTE_LOG_U" length="26" not-null="true" />
</property>
<property name="audit" type="string">
<column name="AUDIT" length="10" />
</property>
</class>
如何在孩子中声明抽象继承?有可能吗??
hibernate-mapping>
<class name="FilleEntity" table="MA_TABLE">.......
感谢您的帮助!
【问题讨论】:
标签: hibernate inheritance hbm