My experience with databases is very limited.
The statement is:
"INSERT INTO eventCategoryMap(eventId, categoryId) VALUES (?, ?) ON DUPLICATE KEY UPDATE eventId = ?, categoryId = ?"
The question signs are values which are added a bit later, before the command is executed. And it generates the following error:
ERROR: Failed inserting event-group mappings into the database. Cannot add or update a child row: a foreign key constraint fails (`databtest`.`eventcategorymap`, CONSTRAINT `fk_eventCategoryMap_category1` FOREIGN KEY (`categoryId`) REFERENCES `category` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION)
How should I modify the statement?