It's not a secret anymore!
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


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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Many-To-Many relationship not working in Hibernate
 
It's not a secret anymore!