-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Dom4JEntity Model and (joined) subclasses
PostPosted: Thu Dec 15, 2005 12:40 pm 
Beginner
Beginner

Joined: Thu Apr 07, 2005 5:12 pm
Posts: 27
Location: Hamburg
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 15, 2005 1:12 pm 
Beginner
Beginner

Joined: Thu Apr 07, 2005 5:12 pm
Posts: 27
Location: Hamburg
Ok, I guess it's still the "bug" #HHH-422. So I should better change the question. If there is a chance that it will be fixed and when it's fixed also ported to 3.0.5? Or is there a workaround?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.