Continuing to the post of reading-from-XML-and-storing-the-values-in-database-using-grails
am facing an another problem in it. As the employee id is related to other tables as foreign key how am suppose to insert the data into the database without conflict what i want to add in grails code to avoid the below displayed error.
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:Cannot add or update a child rowL a foreign key constraint fails.. ( CONSTRAINT 'EMPLOYEE_ID_HEADER' FOREIGN KEY ('EMPLOYEE_ID') REFERENCES 'employee_header'('employee_id'))
here employee_id is a column and employee_header is a separate table that contains employee_id as a foreign key.