[b]Hibernate Tool version:2.1.3[/b]
I have the following mapping which I use to generate java classes:
<class name="ForumRecord" table="FORUM_MESSAGES">
<meta attribute="extends">AbstractRecordBase</meta>
<id name="serial" type="long">
<column name="SERIAL" not-null="true" />
<generator class="native"/>
</id>
<component name="message" class="MessageInfo">
<property name="authorSr" column="AUTHOR_SR" type="long" />
<property name="authorName" column="AUTHOR_NAME" type="string" length="32" not-null="true" />
<property name="body" column="BODY" type="text" not-null="true" />
</component>
...
As I generate java code with hbm2java, I notice that class ForumRecord properly extends AbstractRecordBase, but the class MessageInfo also extends the AbstractRecordBase.
How can I have only ForumRecord to extends AbstractRecordBase and not the classes defined as <component> inside the ForumRecord class?
Also, is there a way to define a component, and all its internal properties once and (re)use it elsewere without having to define again all is properties again?.
Thanks in advance.
|