Mapping documents:
Hi,
I have a class "person", where the mapping-file looks like that:
<class name="Person" table="person">
<meta attribute="generated-class">src_base.Person_base</meta>
<meta attribute="scope-class" inherit="false">public abstract</meta>
<id name="personId" column="personId" type="java.lang.Long"
unsaved-value="null">
<meta attribute="scope-set">protected</meta>
<generator class="native"/>
</id>
Now I want to map a derived class "user" from person-class. I tried to get the personId of the superclass as id for my user-class with composite-id, but it doesn´t work (I really don´t know, whether it´s possible, but think, I might be not the first with that problem, so hibernate should have a quick solution?!)
<class name="User" table="user">
<meta attribute="generated-class">src_base.User_base</meta>
<meta attribute="extends">Person</meta>
<meta attribute="scope-class" inherit="false">public abstract</meta>
<meta attribute="implement-equals">true</meta>
<composite-id name="mandantId" class="Person"
unsaved-value="none">
<key-property name="personId"/>
</composite-id>
<property name="text" column="text" type="java.lang.String" >
<meta attribute="use-in-equals">true</meta>
</property>
When I create the java-files with ant, I do not get the text-property in my java-file.
|