openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Raison" <Alan.Rai...@luminary.co.uk>
Subject Help understanding JPQL Parsing
Date Wed, 05 Aug 2009 09:24:22 GMT
Hi All

I've been running the unit tests against Ingres and now have a 93% pass
rate :)

One problem I'm having is with the test
o.a.o.persistence.jdbc.query.TestOrderByQuery.testOrderByConcatAliasDesc
ending().

The JPQL in the test:

"SELECT CONCAT(p.name, '123') as cname FROM Game p ORDER BY cname DESC"

creates the SQL: 

"SELECT (t0.name + ?) AS cname FROM Game t0 ORDER BY cname DESC"

Unfortunately, Ingres doesn't like the expression (col + ?), since it
can't resolve the type.

Does anyone know why this value isn't being substituted in to the SQL?
I see in SQLBuffer there's a getSQL() method which takes a parameter to
substitute in parameter values - how can this be used?

Thanks
Alan

Mime
View raw message