Hi,
I try to build an data importer / exporter using the Dom4J Entity Model of Hibernate 3.0.5. Everything works fine sofar, as long as I try to query for some classes that are subclasses or that have subclasses mapped.
I get the following exception "org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: de.innuce.masterdata.user.Permission (loaded object was of wrong class)"
<joined-subclass name="de.innuce.masterdata.user.User"
extends="de.innuce.masterdata.person.Role" table="uzer" node="User">
<key column="pk_personrole"/>
<property node="username" name="username" not-null="true" unique="true"/>
<property node="password" name="password" not-null="true"/>
<set name="groups" lazy="false" cascade="none" table="user_usergroup" node=".">
<key column="user_id"/>
<many-to-many column="group_id" class="de.innuce.masterdata.user.Usergroup" node="Usergroup/@id"/>
</set>
<set name="permissions" lazy="false" cascade="none" table="user_permission" node=".">
<key column="user_id"/>
<many-to-many column="permission_id" class="de.innuce.masterdata.user.Permission" node="Permission/@id"/>
</set>
</joined-subclass>
Do I use sth. wrong? Any hints would be nice. Found some entry sofar in the net, they rewrote some method in the BasicEntityPersister.
(
http://opensource2.atlassian.com/projec ... se/HHH-667)
Thank you
Marcus