Hibernate version: 3.1
I have some named sql-query elements in my mapping. They work fine except that the items in the returned object array are in a different order than they are specified in the mapping.
In this example, I would expect...
[a][b][c]
[a][b][c]
[a][b][c]...
Instead, I get...
[c][a][b]
[c][a][b]
[c][a][b]...
Code:
<sql-query name="myQuery">
<return alias="a" class="ClassA"/>
<return alias="b" class="ClassB"/>
<return-scalar column="c" type="long"/>
<![CDATA[
select
{a.*},
{b.*},
c
from
......
]]>
</sql-query>
If I can't fix this, is there a way to make the results a Map, like you can with HQL? I think i'd rather do that anyway.
Thank you