Why would it be "nice" to overload the DB with something that the UI can
resolve?

    Diego


On Wed, Sep 15, 2010 at 18:58, Tim Scott <[email protected]>wrote:

> It's not entities but a tuple i'm returning, so mapping won't work.
> Correct, it is relevant only to the UI.  I'll probably just do in in
> memory.  My only reluctance is it could be a somewhat large results
> set, and would be nice to have the DB server handle it.  Thanks.
>
> On Sep 15, 4:05 pm, Jason Meckley <[email protected]> wrote:
> > 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]<nhusers%[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.

Reply via email to