Tag: delete child entity
-
What are the different ways to delete a child entity in JPA/hibernate through Spring Data?
Let’s say you have an application which creates blog posts and saves them and also the comments user enter on the posts. The Blogpost and the comment represent a parent and child relationship. You may want to delete the comments in three different ways: Delete the comment whenever the blogpost is deleted. Delete the comment…