IllegalArgumentException when executing JPASQLQuery with OpenJPA #120

Closed
mwalter opened this Issue Mar 29, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@mwalter

mwalter commented Mar 29, 2012

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.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Mar 29, 2012

Member

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.

Member

timowest commented Mar 29, 2012

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.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Apr 20, 2012

Member

Released in 2.5.0

Member

timowest commented Apr 20, 2012

Released in 2.5.0

@timowest timowest closed this Apr 20, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment