Regular |
|
Joined: Fri Aug 18, 2006 2:40 pm Posts: 51 Location: Metz, France
|
Hibernate version:3.1.2
Name and version of the database you are using: Oracle9
Hello,
If you want to
1- Fetch object using Criteria API and pagination
2- Use complex order by (containing concat(a,b))
You have to
1- define you own Projection class
2- run Criteria.list to order your result using your Projection, apply pagination and get the PKs
3- run Criteria.list to load the Object based on their PKs
Am I right or did I miss the point ?
Ideally I would like to use a Criteria with some criterions to fetch persistent object AND order them using SQL "concat".
I understand that even in Oracle you have to include the concat in the select clause to be able to use it for ordering the results.
Thanks
_________________ Denis
Don't forget to rate ... thanks.
|
|