File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets 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 ...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Many-To-Many relationship not working in Hibernate
 
Similar Threads
The link table of ManyToMany annotation is not updated in Hibernate
deleting causes : not-null property references a null or transient value
EJB QL w/ ManyToMany
Stuck on manyToMany association
Getting stuck with persisting a M:M relationship