Jan,

It seems to me from reading the NHib code (perhaps someone could
correct me if I'm wrong) that when a collection mapped via a one-to-
many is removed, the first action is to null out the foreign key
column.  This immediately rules out the possibility of getting the SQL
you are wanting.

I think that we could generate a more efficient query when a one-to-
many collection is removed, i.e. process further cascades from child
objects and then issue a single query to delete all the children.
Does this sound possible?

Cheers,
John

On Nov 28, 10:32 pm, Jan Van Ryswyck <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I'm still struggling with this issue myself:
>
> - First of, I really like the on-delete="cascade" feature, but I can't
> seem to convince our DBA's to include a CASCADE DELETE. Long story,
> quite boring.
> - Second, clearing a collection only seem to work on collections that
> don't have inverse=true (correct me if I'm wrong about this).
>
> Does this mean I'm out of options?
>
> On Nov 27, 3:13 pm, "Fabio Maulo" <[EMAIL PROTECTED]> wrote:
>
>
>
> > 2008/11/27 Graham Bunce <[EMAIL PROTECTED]>
>
> > > Thanks Fabio, my problem was not that I wanted a third solution but
> > > that I did not understand what on-delete="cascade" actually did. I
> > > could not find any defintion of this property in the on-line reference
> > > section 6.3. Collections of Values and Many-To-Many Associations. Now
> > > you have explained it I do understand it, and its implications, so I
> > > will use it.
>
> > Yes I know... the time to write the doc is one of our problems;
> > Where(our).IsEqualsTo(NH-community)
> > Our wiki, for reference, stay in the same state I leave
> > it; 
> > Where(our).IsEqualsTo(NH-community)http://nhforge.org/wikis/reference2-0en/default.aspx
>
> > BTWhttp://www.hibernate.org/hib_docs/v3/reference/en-US/html_single/#map...
>
> > --
> > Fabio Maulo- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to