File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

all, delete-orphan in JPA

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
Correct me if I'm wrong but it seems to me that JPA doesn't has a equivalent to Hibernate cascade="all,delete-orphan".
Thank you.
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope, JPA currently does not have orphan delete, but look forward to it in Java EE 6. They have definitely been discussing it and are very close to finishing that add on into the spec.

Mark
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As JPA is copied from Hibernate mainly, why they didn't include every thing?
For example, why they didn't include delete-orphan cascade type?
Any technical issues?
 
Mike Keith
author
Ranch Hand
Posts: 304
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by John Todd:
As JPA is copied from Hibernate mainly, why they didn't include every thing?
For example, why they didn't include delete-orphan cascade type?
Any technical issues?

There are 3 parts to the answer:

1. Because JPA is NOT copied from Hibernate, Hibernate just happens to be one of 5 major implementations
2. Because we didn't (and still don't) believe that the Hibernate way of doing it is necessarily the best way
3. Because we didn't have enough time to put in every single feature that every ORM vendor provided
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic