Hi,
How do I go about specifying a custom persister for class that has a joined subclass? Below is my mapping. I would like the class UserId and the joined subclass UserLogin to use the same custom entity persister I've written. Anyone know how to do this without getting the discriminator not being set warning? (Incidentally, I tried adding a discriminator to the UserId class and that didn't work)
Code:
<class name="UserId" table="[USER]" persister="com.bolt.service.hibernate.persister.MyEntityPersister">
<id name="id" type="java.lang.Integer" column="ID" unsaved-value="null">
<generator class="native"/>
</id>
<property name="memberName" type="java.lang.String" column="MEMBERNAME"/>
<property name="password" type="java.lang.String" column="PASSWORD"/>
<property name="passwordEncrypted" type="java.lang.Boolean" column="ISPASSWORDENCRYPTED"/>
<!-- ========== -->
<!-- USER LOGIN -->
<!-- ========== -->
<joined-subclass name="UserLogin" table="USERLOGINHISTORY" persister="com.bolt.service.hibernate.persister.MyEntityPersister">
<key column="USERID"/>
<property name="lastLogin" type="java.util.Date" column="LASTLOGIN"/>
<property name="totalLogins" type="int" column="TOTALLOGINS"/>
</joined-subclass>
</class>