SQueryTest

Franck Routier <[email protected]>
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <1216799754.14469.20.camel@franck-laptop>
Hi Anthony,

the latest SQuery tests break against Postgresql.

First point is we must quote "SUMSAL" or else Postgresql will return it
as "sumsal" and Sals.get(2).get("SUMSAL") fails.

We also hit another problem in the test, that is collation order and
null sort order.
Each database will choose to say null is lesser than anything, or
greater than anything when ordering, depending on... the database
developpers :)
Postgresql 8.3 has a NULLS FIRST option in ORDER BY, but defaults to
NULLS LAST.
So I guess hsql will put nulls first, while postgresql puts them last.

So in postgresql Sals.get(2).get("SUMSAL") returns 30000.0 (sum(salary)
for null dept), not 20000.0.

So I have updated the test to get around these problems.

Franck



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/SimpleORM/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/SimpleORM/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.