This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes problem in hibernate while accessing rdbms database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "problem in hibernate while accessing rdbms database" Watch "problem in hibernate while accessing rdbms database" New topic
Author

problem in hibernate while accessing rdbms database

vijay pangare
Greenhorn

Joined: Oct 05, 2012
Posts: 2
We Are using hibernate with relational database having cascade constraints on table.
Do we need same constraints mapping in hbm file to access the database?
vijay pangare
Greenhorn

Joined: Oct 05, 2012
Posts: 2
We Are using hibernate with relational database having cascade constraints on table.
As well as same thing in hibernate mapping file also.
But while doing this we are getting error as "Cannot add or update a child row: a foreign key constraint fails (`test_36675`.`sg_shipment`, CONSTRAINT `sg_shipment_ibfk_4` FOREIGN KEY (`STAGE_ID`) REFERENCES `sg_shipment_stage` (`STAGE_ID`) ON DELETE CASCADE ON UPDATE NO ACTION)"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in hibernate while accessing rdbms database
 
Similar Threads
Hibernate - impact of missing foreign key in database
Hibernate and database physical design
Avoid resetting in hibernate
Q 4 C. Bauer & G. King (10): database exceptions
Not-unique unique column