wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes all, delete-orphan in JPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "all, delete-orphan in JPA" Watch "all, delete-orphan in JPA" New topic
Author

all, delete-orphan in JPA

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

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

Joined: Feb 05, 2001
Posts: 17249
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3476

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

Joined: Jul 14, 2005
Posts: 304
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


-Mike
Pro JPA 2: Mastering the Java Persistence API
 
wood burning stoves
 
subject: all, delete-orphan in JPA
 
Similar Threads
One-to-many mapping using SET
JPA - child insertion while parent updation is possible?
Is it possible to load a collection but not save it in Hibernate
Deleting object from list not being deleted in the database
Cascade Issue