-->
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: hibernate one-to-many mapping
PostPosted: Wed Mar 07, 2012 4:09 am 
Newbie

Joined: Wed Mar 07, 2012 3:17 am
Posts: 6
hi everybody,

I had a problem of one-to-many(for both .hbm.xml and annotation) mapping,the thing is i have two classes(Department.java,Employee.java) and two tables(DEPARTMENT,EMPLOYEE),Main.java is our main class here i should use only one session.save() for both classes,the tables should be updated,and in future we would add any amount of employee details and departmet details.but main class could be one session.save(department) like that


Top
 Profile  
 
 Post subject: Re: hibernate one-to-many mapping
PostPosted: Wed Mar 07, 2012 7:06 am 
Newbie

Joined: Fri Feb 17, 2012 8:20 am
Posts: 18
Hi, check this tutorial....

Hibernate One to Many Mapping Insert Query Example


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.