[ACCEPTED]-What is the difference between REMOVE and DELETE?-cascading-deletes

Accepted answer
Score: 28

There is no difference; they're synonyms.

Documentation 9 is rather silent on this but if you look 8 at AnnotationBinder.getCascadeStrategy() source, both are being translated to 7 Hibernate's "delete" cascade type.

The reason 6 that both exist (and I'm guessing here) is 5 because Hibernate core has always used "DELETE" as 4 cascade type, but JPA's CascadeType specifies 3 "REMOVE" as a constant. Hibernate Annotations' CascadeType, being 2 part of Hibernate's JPA extension thus has 1 both for completeness / consistency.

More Related questions