Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Many-To-Many relationship not working in Hibernate

 
Ashok Pradhan
Ranch Hand
Posts: 180
Eclipse IDE Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic