That would get all the objects and delete them one by one. The point here is 
to do bulk deletes. We delete a few thousand entities at a time. Doing that 
with pulling all the objects over the wire and then deleting them one by one 
is not really effective. Even with buffering in the driver (yes, we tried. 
Response time in the double digit seconds).

For now, we do bulk deletes with HQL, which is fast, but we'd like to use 
the specifications containing the expressions to do the bulk deletes. Since 
it's a) type safe (we have a major domain model refactoring down the line), 
b) more discoverable for developers and c) easier to read.

On Thursday, February 10, 2011 6:34:29 PM UTC+1, Fabio Maulo wrote:
>
> well.. if you really want the same behavior of session.Delete(string) then 
> the work to do is only an extension method as for instance:
> public static void Delete<T>(this session, IQueriable<T> query)
> {
> Array.For(query.ToArray(), x=> session.Delete(x));
> }
>

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