[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [eclipselink-users] CASCADE DELETE at DB-side
- From: BÃlint KrivÃn <balint@xxxxxxxxxxx>
- Date: Fri, 17 Dec 2010 15:10:44 +0100
- Delivered-to: firstname.lastname@example.org
Thanks for your help!
Btw, using the @CascadeOnDelete in the trunk version (later in the final 2.2), when I delete my entity, there will be a cascade delete on the DB (because of having the constraint), but will it performing a cascade delete in JPA as well? It would be amazing, if I could use only this annotation, generate DDL, and live happily ever after :)
On Fri, Dec 17, 2010 at 3:06 PM, James Sutherland <jamesssss@xxxxxxxxx>
In the current development stream on EclipseLink (trunk/2.2) Âthere is a
@CascadeOnDelete annotation for declaring the delete cascade constraint.
In the released version of EclipseLink you could,
- use cascade in JPA instead of the constraint
- use cascade in JPA and on the database, EclipseLink will issue the delete,
but should have no affect
- use cascade only in the database, EclipseLink will not issue the SQL, but
object may be left in shared cache (you could invalidate it if you wished)
BÃlint KrivÃn wrote:
> Hello to the community!
> I'm wondering if I'm using ON DELETE CASCADE option on my foreign key,
> it be reflected in EclipseLink objects, or how should I warn EclipseLink
> about this possibility? Is there an annotation for it? Thanks!
> BÃlint KrivÃn
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
ÂEclipseLink , Âhttp://www.oracle.com/technology/products/ias/toplink/
Wiki: Âhttp://wiki.eclipse.org/EclipseLink EclipseLink ,
Forums: Âhttp://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
Book: Âhttp://en.wikibooks.org/wiki/Java_Persistence Java Persistence
Blog: Âhttp://java-persistence-performance.blogspot.com/ Java Persistence
View this message in context: http://old.nabble.com/CASCADE-DELETE-at-DB-side-tp30425056p30481142.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.
eclipselink-users mailing list