Hibernate version:3.1.1
Name and version of the database you are using:Oracle9
Problem:
If I wanted to order my results by CONCAT( COL1, COL2 ),
with COL1 and COL2 being columns of root table, formula would do it fine.
But my Criteria uses two left outer join and I would like to use columns of the joined tables in my concat.
Code:
formula=" concat ( fo1_.nom , concat ( pe2_.lastname, official_name ) )"
Currently it works, but the aliases fo1_ and pe2_ are used to access joined tables and they may change in the future generated sql
(whereas they are hard coded in the xml mapping)
Is it a safer way to access joined tables column from inside a formula ?