Hibernate version: 3.0.3; respectively Hibernate tools as per CVS
Mapping example:
Code:
<hibernate-mapping package="com.ez.ezrt.model">
<class name="ITDatabaseNL"
table="ITDATABASE"
mutable="false"
batch-size="10">
<id name="id"
type="java.lang.Long"
column="ID"
unsaved-value="0">
<generator class="identity" />
</id>
<property name="itName"
type="java.lang.String"
column="itName"
not-null="true"
unique="true"
length="100" />
</class>
<class name="ITDatabase"
table="ITDATABASE"
mutable="false"
batch-size="10"
polymorphism="explicit">
<meta attribute="extends">ITDatabaseNL</meta>
<id name="id"
type="java.lang.Long"
column="ID"
unsaved-value="0">
<generator class="identity" />
</id>
<property name="itName"
type="java.lang.String"
column="itName"
not-null="true"
unique="true"
length="100" />
<property name="connectionURL"
type="java.lang.String"
column="connectionURL"
not-null="true"
length="100" />
</class>
</hibernate-mapping>
According to
LightweightClass the recommended solution is to use
Code:
polymorphism=explicit
.
I have find the way to specify that ITDatabase extends ITDatabaseNL in the generated code (see the
Code:
<meta>
usage).
However at the 2nd step i wanted to define that the generated fields in the ITDatabaseNL are
protected level and so they are not getting regenerated in the ITDatabasa.
Is this possible?