This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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
  • 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: 17278
6
IntelliJ IDE Mac Spring
  • 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
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic