Hi

I'm using AsPagination from MvcContrib and I'm having some problems
when it's calculating the total number of records when also using an
orderby clause.

Working example.
from u in db.users
select u;
records = u.Count();

Non working code:
from u in db.users
orderby u.Username
select u;
records = u.Count();

The resulting sql looks like:
SELECT count(*) as y0_ FROM Users this_ ORDER BY this_.Username asc

And the error is.
Column "Users.Username" is invalid in the ORDER BY clause because it
is not contained in either an aggregate function or the GROUP BY
clause.

Is this a bug in NHibernate.Linq or NHibernate?

What do I nedd to do to resolve this issue?

Thanks

Anders

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