Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0.5
Name and version of the database you are using: AS/400 DB2 V5R1
The generated SQL (show_sql=true): Yes
Dear all,
I would like to create a new MyOrder class, override the class
org.hibernate.criterion.Order
such that the MyOrder.toSqlString() will return the column alias "order by BAPROD0_ asc" instead of "order by this_.BAPROD asc" which contains the table alias followed by the column name.
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException {
StringBuffer fragment = new StringBuffer();
.....
return fragment.toString();
}
How can I do this?
Your help is greatly appreciated.