Hi, All
I have next hierarchy of classes:
ParameterGenBo (POJO object)
^
Parameter
^
ParameterWithData
^
SicParameter
I want to use "Table per class hierarchy" mapping. But for me this type of mapping is not working: instead of "SicParameter" I am getting object with "Parameter" class (I am checking by ID that correct db-record readed; also descriminator-valeue is set to "Sic").
mapping file for Parameter (Parameter.hbm.xml) is
Code:
<hibernate-mapping>
<class name="*****.Parameter" table="parameter">
<id name="id" type="int">
<column name="id" />
<generator class="assigned" />
</id>
<discriminator column="shortname"/>
<property name="fullname" type="string">
<column name="fullname" length="64" not-null="true" />
</property>
.....
<subclass name="*****.SicParameter" discriminator-value="Sic"/>
</class>
</hibernate-mapping>
Hibernate version is 3.3.1GA
Name and version of the database you are using:MSSQL 2008