*
The moose likes Object Relational Mapping and the fly likes Many-To-Many relationship not working in Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Many-To-Many relationship not working in Hibernate" Watch "Many-To-Many relationship not working in Hibernate" New topic
Author

Many-To-Many relationship not working in Hibernate

Ashok Pradhan
Ranch Hand

Joined: Dec 17, 2007
Posts: 180

My entity Classes

Teacher


Section



Main Class


Everything works well if I include



before I call


Otherwise the generated JoinTable and Section table does not include section2 data
But my question is - As I have annotated in Teacher class the above things (saving section objects before teacher object) are not necessary.

Please show me some light ...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Many-To-Many relationship not working in Hibernate