This content has been marked as final.
Show 4 replies
-
1. Re: Dynamic ORDER BY using hibernate/ejb3
dornus Nov 18, 2005 9:46 AM (in response to dornus)Any answer for this? I don't want to mark it with an annotation since it may change each time the query is executed.
-
2. Re: Dynamic ORDER BY using hibernate/ejb3
patrick_ibg Nov 18, 2005 11:12 AM (in response to dornus)Use the Hibernate Criteria API.
-
3. Re: Dynamic ORDER BY using hibernate/ejb3
dornus Nov 18, 2005 11:31 AM (in response to dornus)What is that? I looked at the docs for HQL before I asked here. Any examples would be useful.
-
4. Re: Dynamic ORDER BY using hibernate/ejb3
patrick_ibg Nov 18, 2005 12:44 PM (in response to dornus)Look at HB 3.1 javadocs and reference...
Session session = ((org.jboss.ejb3.entity.HibernateSession) em).getHibernateSession() ; Criteria crit = session.createCriteria (MyTable.class) .addOrder (Order.asc (columName)) ; List list = crit.list () ;