Yes it is possible. (eventhough wrong list) please use <
[email protected]>, next time
you don't need to have projection for counting.

criteria.Add(Restrictions.Eq("Property2",44)).SetProjection(Projections.Count()).UniqueResult<int>()




Tuna Toksöz
Eternal sunshine of the open source mind.

http://devlicio.us/blogs/tuna_toksoz
http://tunatoksoz.com
http://twitter.com/tehlike




On Mon, May 18, 2009 at 7:05 PM, Vito Vessia <[email protected]> wrote:

>
> Hi, my name is Vito Vessia and I use NHibernate in a big project.
> I'd like to perform the following sql query using the criteria APIs:
>
> select count(*)
> from
> (
>    select field1, field2, field3 from table where field2 = 44
> ) data
>
>
> Is it possibile to do that?
>
> Thanks a lot for any suggestions.
>
> --Vito
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NHibernate Contrib - Development Group" 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.ar/group/nhcdevs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to