Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalArgumentException when executing JPASQLQuery with OpenJPA #120

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

IllegalArgumentException when executing JPASQLQuery with OpenJPA #120

mwalter opened this issue Mar 29, 2012 · 2 comments

Comments

@mwalter
Copy link

@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
Copy link
Member

@timowest 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
Copy link
Member

@timowest 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
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants