I am using struts and hibernate. I have a parent and child relation using set in hbm. In the action I am using session.saveOrUpdate() method to save but while s
session.saveOrUpdate()
I had the same as well.Making the Id (0) doing "(your Model value).setId(0)" solved my problem.