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.  [ 1 post ] 
Author Message
 Post subject: hibernate.MappingException: Unknown entity class Error
PostPosted: Tue Oct 11, 2005 6:44 am 
Newbie

Joined: Tue Oct 11, 2005 3:27 am
Posts: 5
hi all

User spToSave =new User();
spToSave.setUserGroup(userGroup);

<--userGroup been passed is a set, the field in obj class is also a set. however i get the folowing error

net.sf.hibernate.MappingException: Unknown entity class: java.lang.String

user.hbm.xml excerpt is as follows:

<class name="com.da.vcrmanager.data.User" proxy="com.da.vcrmanager.data.User" table="USERS">
<id name="id" column="uid" type="long">
<generator class="increment"/>
</id>
<property name="name"/>
<property name="username" not-null="true" type="string"/>
<property name="password"/>

<bag name="roles" table="USER_ROLES" lazy="false" cascade="save-update">
<key column="user_id"/>
<many-to-many class="com.da.vcrmanager.data.Role" column="role_id" outer-join="auto"/>
</bag>

<set name="userGroup" table="usergroups" cascade="all" lazy="false">
<key column="user_id" />
<one-to-many class="com.da.vcrmanager.data.UserGroup" />
</set>
</class>


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

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.