Keshav Prasad gurukul wrote:
change the generator class to incerment,hilo or other auto-numeric hibernate class.
thanks Keshav!
now after implementing this (i used increment)... neither the parent table nor the child table are getting inserted with the data
now i am getting these error messages:
and please have a look at the sql statements on the first 3 lines :
Hibernate: insert into parent (father_or_mother, parent_firstname, parent_lastname, parent_id) values (?, ?, ?, ?)
Hibernate: update child set parent_id=? where child_id=?
Hibernate: update child set parent_id=? where child_id=?
why is it trying to update when my real intention is to insert new records into the child table
and how do i fix this?