I remember an issue on jira but no progress yet.
On Fri, Dec 19, 2008 at 4:09 PM, alex <[email protected]> wrote:
>
> Hi,
>
> I need to create a criteria that would do the following:
> SELECT MAX(column_1)
> FROM my_table
> GROUP BY column_2
>
> So, I'm creating NHibernate criteria:
>
> criteria.SetProjection(Projections.ProjectionList()
> .Add(Projections.Max("Column1")
> .Add(Projections.GroupProperty("Column2))
>
> But this will result in the following SQL:
> SELECT MAX(column_1),
> column_2
> FROM my_table
> GROUP BY column_2
>
> Could someone explain how to do "group by" without adding a "group by"
> column to the result?
>
> Thanks.
> >
>
--
Tuna Toksöz
http://tunatoksoz.com
Typos included to enhance the readers attention!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---