• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to solve this exception? and what the mistake I have done in my code??

 
Harishwar Madhya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain me, whats the mistake I have committed for the below code:

















and here is the exception, Im getting:





Now please Tell me whats wrong I have written the code and provide me the solution for it.. and also I would like to know, when it executes the "session.save(event);" so in which order it generates the SQL statements..??


Waiting for your replies...



Harishwar
 
Harishwar Madhya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please someone tell the mistake in my code..
 
Harishwar Madhya
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I thought this forum would help me a lot in solving problems.. But none of them are replying.. I dont know whether no one knows the answer for my question orelse no one has time to look at it... I will be quite happy if anyone would solve my problem..
 
Ankit Garg
Sheriff
Posts: 9529
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At a glance it seems this is because the OneToMany association in Event class for Speaker doesn't cascade the save operation, and since the speaker1 object is not saved to the database, so when you try to save the Event object, you get an exception...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic