Does this remove the hibernate limitation on nullable foreign keys? (that
foreign keys of collections need to be nullable even if there is a cascade
all-delete-orphan). If yes, great! If no, still great! (but I'll be back on
this issue).

Henri

----- Original Message ----- 
From: "Gavin King" <[EMAIL PROTECTED]>
To: "hibernate-devel" <[EMAIL PROTECTED]>
Sent: Wednesday, July 21, 2004 6:32 AM
Subject: [Hibernate] support for ON CASCADE DELETE


> I've implemented support for ON DELETE CASCADE foreign key
> definitions for parent/child associations (ie. for inverse
> one-to-many).
>
> You map this like:
>
> <set name="children" inverse="true" cascade="all">
>     <key name="PARENT_ID" on-delete="cascade"/>
>     <one-to-many class="Child"/>
> </set>
>
> So, when the Parent instance is deleted, Hibernate
> does not need to perform n+1 deletes; instead, we
> leave that to the database to take care of.
>
> Any comments?
>
> -- 
> Gavin King
> +61 41 053 4454
> +1 404 822 8349
>
> Hibernate
> [EMAIL PROTECTED]
> http://hibernate.org
>
> JBoss Inc
> [EMAIL PROTECTED]
> http://jboss.com
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> _______________________________________________
> hibernate-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/hibernate-devel
>


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to