If your RDBMS accept multiquery and your drive accept batcher (as MsSQL and
Oracle for example) all deletes will be executed in just one roundtrip.

2009/5/16 Graham Bunce <[email protected]>

>
> Having seen (and had) this discussion several times before, isn't the
> problem not that this method does not do what it is meant to, but this
> method actually does not do what people would expect it to?
>
> i.e. If I call Clear() I would expect NH to issue an efficient DELETE
> FROM x WHERE x.Parent.id = ?
>
> In fact, it doesn't do this and, from what I understand nor is it
> meant to. Therefore there is no "bug" as such but a mismatch between
> the logical interpretation of what this would do by a person looking
> at this for the first time and what the NH developers expect it to
> do.I humbly suggest the NH developers should consider this mismatch
> between expectation and reality.
>
> Similarly, the cascade mapping doesn't actually tell NH to do a DELETE
> either. As has been explained to me in another post it instead tells
> NH to depend on the database CASCADE RI features. TBH having this
> capability isn't a bad idea, but it does mean the developers are
> allowed to change the database definition (which they may not) and the
> acceptance of NH delegating part of its work to the physical database,
> which could be a problem if you swap DB implementations.
>
> The documentation is this area, especially for the Clear(), is
> misleading... and IMO Clear() should do an efficient DELETE anyway
> instead of nothing at all.
>
> >
>


-- 
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
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