you can map it to the Entity <property name="Position"
formula="Row_Count()" /> this ties you to a specific database though.
if you are projecting you can use new SqlFunction() which executes
Row_Count. there is also a way to register keywords for hql, but i
forget how to do that at the moment.

I can't see how this information has any meaning outside of the UI.
therefore I would process this in memory, rather than on the database.
you have the page and page count, so calculating the row number is
simple.

On Sep 15, 4:23 pm, Tim Scott <[email protected]> wrote:
> Is there any simple way to add a row number column to the result of a
> query using ICriteria?  Don't see any projections that do this.  I
> suppose I could use SqlProjection, but I'd rather not, especially
> since order-bys will be dynamic in this case.  If course I could add
> it in memory after the query returns, but I'd rather not do that
> either.

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