springframeworkguru / spring5-recipe-app Goto Github PK
View Code? Open in Web Editor NEWspring5-recipe-app
spring5-recipe-app
when we try to delete a recipe after editing any of the entities referenced by it (Notes, Ingredients...etc), then the recipe can't be deleted a SQL Exception is thrown regarding referential integrity, saying.
org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Referential integrity constraint violation: "FKAELN1FTJ8676MM6E78IU7IBWQ: PUBLIC.NOTE FOREIGN KEY(RECIPE_ID) REFERENCES PUBLIC.RECIPE(ID) (2)"; SQL statement:
delete from recipe where id=? [23503-200]
Steps to reproduce:
could not execute statement; SQL [n/a]; constraint ["FKDBFSIV21OCSBT63SD6FG0T3C8: PUBLIC.NOTES FOREIGN KEY(RECIPE_ID) REFERENCES PUBLIC.RECIPE(ID) (1)"; SQL statement: delete from recipe where id=? [23503-197]]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
Expected behavior:
You can delete the recipe after an update.
unable to find Recipe with id of 6 even though no recipe with that ID is created or set. After tracing this bug, It seems to happen on the RecipeRepository#save method call in RecipeServiceImpl#saveRecipeCommand
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.