-->
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: one-to-may problem
PostPosted: Fri Oct 02, 2009 2:45 am 
Newbie

Joined: Fri Aug 07, 2009 1:02 am
Posts: 4
Hi,

I am getting below exception : it is a simple ans straight one=to-many relation ship

org.hibernate.HibernateException: identifier of an instance of StudetUSer was altered from 8a9e82a423e259da0123e25ae4570003 to null
Code:
User user=new USer();   
 
StudentUser su=new StudentUSer();   
 
Student s=new student();   
s.setName("s1");   
....   
 
su.setstudent(s);   
 
Set studentSet=new HashSet();   
 
studentSet.setStudentUser(su);   
 
 
user.setStudents(studentSet);   



it is simple relation ship, i am no wrae altering PK of Student User

plesae help me out.


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