openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From is_maximum <>
Subject OpenJPA dosn't respect numeric parameters order - bug?
Date Sun, 28 Dec 2008 07:55:48 GMT


consider a query with two parameter ?1 and ?2
if the order they are apeared in query is ?2 and ?1 then OpenJPA can't
understand the real order!!!

String query = "select e from MyEntity as e where = ?2 and e.amount <

Query q = em.createQuery(query);
q.setParameter(1,new Double(1000));


after this line openJPA complains that the parameter 2 is of type
java.lang.String but is declared in query for the type java.lang.Double

this is an incorrect actions since many queries we are building are creating
at runtime and we can only rely on this order but now OpenJPA messed up

Do I have to post an issue in JIRA?

View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message