I am getting this error, when saving data to my db:
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row:
a foreign key constraint fails (mydb.samplelist_item, CONSTRAINTFK_SAMPLELIST_ITEM_SAMPLELIST
FOREIGN KEY (samplelist_id) REFERENCESsamplelist(samplelist_id) ON DELETE CASCADE ON UPDATE CASCADE)
Not sure what the problem is.
It sounds like you are trying to add a row to a table with a foreign key, but the value you’re specifying for the foreign key column does not have a match in the foreign table.