When i am trying to insert values in MySQL table through java code, I am getting the exception:
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (
icd_app_suite/mapper, CONSTRAINTFK_mapper_1FOREIGN KEY (user_id) REFERENCESuser_detail(user_id) ON DELETE CASCADE ON UPDATE CASCADE)
What can be the cause?