It is not supported on nhibernate if this is all you want to hear
IIRC there was a thread on the developer list or in this list few months
ago.
How to proceed?
1-Search the jira; jira.nhforge.org for this new feature
1-a. Found the ticket - jump to step 2
1-b. There is not ticket-
1-b-1 Add the ticket
1-b-2 Subscribe to the ticket news
1-b-3 Add a test case, add the method you want to the ISession in order
to compile. and write a test explaining how this should work
2-Vote the ticket
3-Try to fix the broken test
4-attach the patch to the ticket
2011/2/13 Glenn <[email protected]>
> Let me try and explain this a different way. Yes, ISession.Delete(string)
> will take an HQL sting and do a bulk delete. That's fine, we use that today
> and it works okay. We have a few problems with it though. The HQL string is
> not type safe, the repositories get littered with different
> DeleteAllCustomersThatHaveXYandZ methods and the code could be easier to
> read.
>
> Since we're already using specifications for querying, it was a thought to
> use specifications for deleting as well. Thus the need to convert an
> expression to an HQL sting that we can pass into ISession.Delete(string). So
> that we could do
>
> repository.Delete(new CustomerFromArgentina() && new InactiveCustomer())
>
> The two specifications are merged to a single expression (c.Country =
> "Argentina" && c.Status = CustomerStatus.Inactive) from which we would
> generate the HQL and pass that on to ISession.Delete.
>
> Instead of writing the HQL manually like we do today.
>
> --
> 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.
>
--
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.