Spring Data JPA violating foreign key constraint although the logged queries and their bound parameters look as expected
I have a Spring Boot backend that uses Spring Data JPA to communicate with the database. I am attempting to save a cart item into the database, but a foreign key constraint fails while saving a child row to a table that establishes a many-to-many relationship between cart items and excursions. Inspecting the logged SQL queries and their bound parameters does not reveal any issue that I can see.