[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] CASCADE DELETE at DB-side

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> wrote:

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,
> will
> it be reflected in EclipseLink objects, or how should I warn EclipseLink
> about this possibility? Is there an annotation for it? Thanks!
>
> --
> Regards,
> BÃlint KrivÃn
>
>


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland
http://www.eclipse.org/eclipselink/
ÂEclipseLink , Âhttp://www.oracle.com/technology/products/ias/toplink/
TopLink
Wiki: Âhttp://wiki.eclipse.org/EclipseLink EclipseLink ,
http://wiki.oracle.com/page/TopLink TopLink
Forums: Âhttp://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink ,
http://www.nabble.com/EclipseLink-f26430.html EclipseLink
Book: Âhttp://en.wikibooks.org/wiki/Java_Persistence Java Persistence
Blog: Âhttp://java-persistence-performance.blogspot.com/ Java Persistence
Performance
--
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
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



--
Ãdv,
KrivÃn BÃlint