2023-12-25 18:49:47.680 ERROR 12228 --- [nio-8090-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException:
### Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`memo`.`collection`, CONSTRAINT `fk_collection_note_1` FOREIGN KEY (`noteid`) REFERENCES `note` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT)
### The error may exist in com/example/memo/mapper/NoteMapper.java (best guess)
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: DELETE FROM note WHERE id=?
### Cause: java.sql.SQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`memo`.`collection`, CONSTRAINT `fk_collection_note_1` FOREIGN KEY (`noteid`) REFERENCES `note` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT)
; Cannot delete or update a parent row: a foreign key constraint fails (`memo`.`collection`, CONSTRAINT `fk_collection_note_1` FOREIGN KEY (`noteid`) REFERENCES `note` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT); nested exception is java.sql.SQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`memo`.`collection`, CONSTRAINT `fk_collection_note_1` FOREIGN KEY (`noteid`) REFERENCES `note` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT)] with root cause