You can set a ResultTransformer to your criteria. https://www.hibernate.org/hib_docs/v3/api/org/hibernate/transform/ResultTransformer.html
On Thu, Aug 27, 2009 at 8:06 AM, Kalle Korhonen <kalle.o.korho...@gmail.com>wrote: > I'm using tapestry-hibernate and I have a case where I'm forced to use > Projections (or aggregate functions in hql but same end result) so my > query is returning an object array. Now, I'm rendering a list of that > information to the user, but since using ${obj[0]} expansion is not > supported, I'm forced to write a getter for each synthetic property > (so I can refer to them with ${objProp1}, ${objProp2} etc.) I'm > displaying in my grid. It's not too bad, but is there a better way to > do this? (could do it with ognl, but I would like to avoid adding a > new dependency just for this). > > Kalle > > PS. Bonus points if you tell me how to make Hibernate return objects > with Criteria api if I only need projections for ordering the result > set. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Best regards, Igor Drobiazko