Joined: Fri Feb 18, 2005 5:09 am Posts: 1
|
Hibernate version: 2.1.7
MySQL 4.1.7-Max-log
Hi There
I have scoured the net in search of an answer to my question and came up empty handed so if someone could help me out that would be great:
I would like to use the SQL 'CAST' function for the 'order-by' option of a hibernate 'set' mapping:
<set
name="pointsOfSale"
lazy="false"
inverse="true"
cascade="none"
sort="unsorted"
order-by="cast(client_identifier as unsigned)"
where="deleted is null"
>
client_identifier is a varchar(255)
I need to do this so I can order the column based on it's numerical values.
This however doesn't work for me, i get an sql grammar exception. Is there another way to do this in hibernate with set relations?
Regards
Mark Linley
|
|