Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1956

Foreign key constraint error when I use MySQL running under Windows 7. (1 reply)

$
0
0
I'm getting a foreign key constraint error when I use MySQL running under Windows 7. When I run the same MySQL and Hybernate code on Mac, it works just fine. Here are the details of the error:

09:48:40,765 ERROR JDBCExceptionReporter:101 - Cannot add or update a child row: a foreign key constraint fails (`ff`.`contingency`, CONSTRAINT `FK1F21462F65430969` FOREIGN KEY (`EEC_ID`) REFERENCES `event` (`EEC_ID`))
09:48:40,766 ERROR AbstractFlushingEventListener:324 - Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationExcepti on: Could not execute JDBC batch update

I already tried simple solutions like:
SET FOREIGN_KEY_CHECKS = 0;

Do you know what is different between MySQL on Windows 7 and Mac OS which might be causing this problem?

Thanks.

Viewing all articles
Browse latest Browse all 1956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>