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 Re: Wrong sorting when using orderBy clause
Date Mon, 15 Dec 2008 17:55:31 GMT
Thanks for your reply.

Yes, the query has an 'order by' on just those two columns.

ORDER BY t1.id ASC, t2.tag ASC

I can provide some more information to track down the problem...

The query has a LIKE clause defined as

WHERE LOWER(tag) LIKE LOWER('%$value$%')

With pgAdmin I always get the correct results, no matter what I pass to  
the LIKE clause.
Instead, when I refresh my page that fetches the data with iBatis, I get  
different results if I pass "grap", "graph", or "graphic" (I mean,  
different ordering in the 'tagList' property).

Between the DB and iBatis there is Spring and the JDBC driver  

I can provide a test program that reproduce this behaviour.

If iBatis use, as expected, the order returned by the DB, maybe there's an  
issue in the driver?

Please help me track down this problem :(

Thank you,

In data 15 dicembre 2008 alle ore 18:21:47, Jeff Butler  
<jeffgbutler@gmail.com> ha scritto:

> No - I have tests running that show this is not an issue.
> iBATIS will use the order returned from the database.  Make sure your
> SQL has an order by clause containing both id and tag.
> Jeff Butler
> On Mon, Dec 15, 2008 at 11:03 AM, Corrado Alesso
> <co.alesso@fastwebnet.it> wrote:
>> In data 14 dicembre 2008 alle ore 15:33:40, Corrado Alesso
>> <co.alesso@fastwebnet.it> ha scritto:
>>> Hello everyone, I'm facing a problem with iBatis.
>> [cut]
>> Do you think that this should be filed as an iBatis issue?

View raw message