Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
IllegalArgumentException when executing JPASQLQuery with OpenJPA #120
When a JPASQLQuery is executed with OpenJPA, a IllegalArgumentException is thrown indicating that 1-based positional parameters should be used instead of named parameters like ":a1".
See thread https://groups.google.com/forum/#!topic/querydsl/20Vxcju7Xw8 in Querydsl Google group.
Error is reproducible with Querydsl 2.2.5 and OpenJPA 1.2.3.
It appears only positional parameters are supported by the JPA specification:
Named parameters follow the rules for identifiers defined in Section 4.4.1. The use of named parameters applies to the Java Persistence query language, and is not defined for native queries. Only positional parameter binding may be portably used for native queries.