ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Corrado Alesso" <co.ale...@fastwebnet.it>
Subject Wrong sorting when using orderBy clause
Date Sun, 14 Dec 2008 14:33:40 GMT
Hello everyone, I'm facing a problem with iBatis.

I guess this is a known problem, but after a couple of hours looking for a  
solution with no luck, I have to write here...

I have an entity that has a complex colletion as a property. So I perform  
a query with a join, and I use the 'groupBy' clause with the ResultMap.  
Everything is working fine, and the complex property is populated with all  
the objects.

The problem is that I've put an 'order by' clause in the query, and this  
ordering is not respected by iBatis. I mean, when I access the complex  
property (which is a List of objects) it is not ordered the same way.

For example, when I execute the query in the console I get:

id  user  tag
4   u1    graphic
4   u1    layout
4   u1    website

(the query has an 'order by' on 'tag')

When I iterate the complex property tag of my Java object I get:


Any idea or keyword I should search for?

Thank you


View raw message