Hibernate version: 3.1
Hello,
I am having problems with an order by statement on a composite datatype.
My composite datatype is Money (which has a Double and a Currency). My HQL query is
Code:
"select from Item as item order by item.price desc"
(price being my composite datatype)
Here is the abbreviated generated sql (with Oracle9iDialect):
Code:
select ....
from ....
where ...
order by item_.PRICE_AMOUNT, item_.PRICE_CURRENCY desc
When it should be:
Code:
select ....
from ....
where ...
order by item_.PRICE_AMOUNT desc, item_.PRICE_CURRENCY desc
The difference being that the "desc" is only applied to the second attribute of my composite datatype. I would want the desc to be on the amount and on the currency.
Anybody ever encounter this problem? If there is a workaround or if it can be easily modified in the dialect or in the code? If so, please give me some cues as to where to start.
Thank you,
François