cjsolomon / Mulit-Modal

SRU Multi-Modal Project
0 stars 2 forks source link

DB Foreign Key Issue #8

Closed ghost closed 10 years ago

ghost commented 10 years ago

I am getting the following error when testing Plane and Rail

Error com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`multi-modal`.`plane`, CONSTRAINT `Carrier` FOREIGN KEY (`Carrier`) REFERENCES `carriers` (`CarrierID`) ON DELETE NO ACTION ON UPDATE NO ACTION)
Number of Connections 33
Error com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`multi-modal`.`plane`, CONSTRAINT `Carrier` FOREIGN KEY (`Carrier`) REFERENCES `carriers` (`CarrierID`) ON DELETE NO ACTION ON UPDATE NO ACTION)
Number of Connections 35
Error com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`multi-modal`.`plane`, CONSTRAINT `Carrier` FOREIGN KEY (`Carrier`) REFERENCES `carriers` (`CarrierID`) ON DELETE NO ACTION ON UPDATE NO ACTION)
Number of Connections 38
Error com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`multi-modal`.`plane`, CONSTRAINT `Carrier` FOREIGN KEY (`Carrier`) REFERENCES `carriers` (`CarrierID`) ON DELETE NO ACTION ON UPDATE NO ACTION)
Number of Connections 42
Error com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`multi-modal`.`rail`, CONSTRAINT `Contractor` FOREIGN KEY (`Carrier`) REFERENCES `carriers` (`CarrierID`) ON DELETE NO ACTION ON UPDATE NO ACTION)
Number of Connections 44
Error com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`multi-modal`.`rail`, CONSTRAINT `Contractor` FOREIGN KEY (`Carrier`) REFERENCES `carriers` (`CarrierID`) ON DELETE NO ACTION ON UPDATE NO ACTION)
Number of Connections 46
Error com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`multi-modal`.`rail`, CONSTRAINT `Contractor` FOREIGN KEY (`Carrier`) REFERENCES `carriers` (`CarrierID`) ON DELETE NO ACTION ON UPDATE NO ACTION)
Number of Connections 49
Error com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`multi-modal`.`rail`, CONSTRAINT `Contractor` FOREIGN KEY (`Carrier`) REFERENCES `carriers` (`CarrierID`) ON DELETE NO ACTION ON UPDATE NO ACTION)
Number of Connections 53

Chris said to assign it to you since you were messing with the keys in the DB. The other classes work just fine.

JordanSchiller1064 commented 10 years ago

Deleted all the foreign key dependences, we will probably have to handle this in the code itself due to the sophisticated interdependences of the classes