| Author |
java.sql.SQLException: Cannot add or update a child row: a foreign key constraint fails
|
Rohit Bhal
Ranch Hand
Joined: Aug 28, 2007
Posts: 44
|
|
Hi
Could someone help me understand that why am I getting the following error when I am trying to persist ServiceProvider entity?
The situation is like this: a ServiceProvider has a List of BusinessLocation and a State has a list of BusinessLocation.
Following annotated classes that I want to be persisted:
ServiceProvider.java
BusinessLocation,java
Looking forward to someone waking me up of the blunder I might be commiting here.
Thanks.
|
Skip Skipping
|
 |
Rohit Bhal
Ranch Hand
Joined: Aug 28, 2007
Posts: 44
|
|
Hi
I've got this problem resolved. The blunder that I was committting was that I was trying to override the automatically generated IDs by Hibernate.
Thanks
|
 |
 |
|
|
subject: java.sql.SQLException: Cannot add or update a child row: a foreign key constraint fails
|
|
|