JPA - Removing entities
- by James P.
I have a Story entity with the following associations:
Story <1-* Chapter
Story <1-* Comment
Story <*-1 User
What is the correct way of removing this entity and handling the all the entities that is referring to? Is there some shorthand way of specifying that associated entities must be handled automatically or is the @PreRemove annoation mentionned in the article below a valid of achieving this?
http://blog.xebia.com/2009/04/09/jpa-implementation-patterns-removing-entities/