• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to persist data in tables with Many-to-Many relationship

 
Bhagirathi Mallick
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


and this is another class for options


and




And this is the main method





When i am executing this code
I am getting an exception like
org.hibernate.PersistentObjectException : detached entity passed to persist: com.crosscoce.entity.Question

 
Monica Shiralkar
Ranch Hand
Posts: 866
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so you mean to say userId column will come in Email table only in case of one to many Bidirectional and not in case of one to many unidirectional? So in case of one to many unidirectional in Email table we should have only one column that is EmailId?

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic