-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: EJB 3.0 annotation for delete-orphan?
PostPosted: Fri May 13, 2005 5:19 pm 
Pro
Pro

Joined: Fri Nov 19, 2004 5:52 pm
Posts: 232
Location: Chicago, IL
Hibernate version: hibernate-3.0.3, hibernate-annotations-3.0beta1

I'm using EJB 3.0 annotations with Hibernate. I have a OneToMany where I think I need to use a delete-orphan cascade type. However, it appears that this cascade type isn't a supported javax.persistence.CascadeType? I'm wondering if this is something that might be added in the future, or, if there is a Hibernate specific way to do this using annotations? I'm wondering if I will need to switch to using XML configuration files to do this.


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 14, 2005 2:33 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Hum, check the forum.
Anyway, I've commited something in CVS. It will be provided in the next version

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2005 10:28 am 
Pro
Pro

Joined: Fri Nov 19, 2004 5:52 pm
Posts: 232
Location: Chicago, IL
Thanks. Can you tell me if this is something specific to Hibernate, or, is this something that will be added to the EJB spec?


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2005 1:33 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
@org.hibernate.annotations.Cascade(CascadeType.DELETE_ORPHAN) on a method works, but I don't know why it's only available for a method atm.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2005 2:14 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I fixed the methopd only issue.
This is Hibernate specific atm. It is planed for a future revision of the EJB3 spec.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 29, 2005 4:46 pm 
Pro
Pro

Joined: Fri Nov 19, 2004 5:52 pm
Posts: 232
Location: Chicago, IL
Does anyone know if it is expected for this to make it into the EJB spec before it is finalized? It would be a shame for this to not be a standard feature of the Java Persistence API.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 29, 2005 6:09 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
It's an ugly hack from an object model point of view (well, thats what you have to do if you do pointer chasing instead of relational). I doubt it will every made it into any specification. It will be a common vendor extension though.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.