I'm declaring a property as a discriminator the value never changes in the DB when persisting either the parent class or the sub class.
When I persist the subclass (ForumDTO), I have the isForum property set to true. But Hibernate inserts the record with that column set to false.
What am I missing?
Thanks in advance.
Hibernate version:
3.2
Mapping documents:
Code:
<hibernate-mapping>
<class name="ChannelDTO" table="channel">
<id name="channelID" column="channelID">
<generator class="native"/>
</id>
<discriminator column="isForum" type="boolean" />
<property name="title"/>
<subclass name="ForumDTO" >
<property name="date"/>
</subclass>
</class>
</hibernate-mapping>