Hi, i'v a very simple database with a table called articoli and another catalogo.
Catalogo contains a column that stores foreign keys relative to articoli.
What i want is that when i delete a record from articoli, according to articoli.ID it automatically should delete all the records of the same foreign key inside catalogo.
So, inside relations window of the table catalogo, i setted CASCADE in both on_update and on_delete, but it retrieve me error
#1452 - Cannot add or update a child row: a foreign key constraint fails (`catalogo`.`#sql-75c_319`, CONSTRAINT `#sql-75c_319_ibfk_1` FOREIGN KEY (`ID`) REFERENCES `articoli` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE)
Catalogo contains a column that stores foreign keys relative to articoli.
What i want is that when i delete a record from articoli, according to articoli.ID it automatically should delete all the records of the same foreign key inside catalogo.
So, inside relations window of the table catalogo, i setted CASCADE in both on_update and on_delete, but it retrieve me error
#1452 - Cannot add or update a child row: a foreign key constraint fails (`catalogo`.`#sql-75c_319`, CONSTRAINT `#sql-75c_319_ibfk_1` FOREIGN KEY (`ID`) REFERENCES `articoli` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE)