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

Setting limit on QueryBase causes list() method with query projection return additional rd column, that cannot be mapped to any field in query projection #427

Closed
perkoren opened this issue Jun 1, 2013 · 1 comment
Labels
Milestone

Comments

@perkoren
Copy link

@perkoren perkoren commented Jun 1, 2013

Setting a limit on a query causes in OracleTemplate to execute the following query:

select * from (
select a.*, rownum rn from ( ...)
a) where rn > lower_limit and rn <= upper_limit

that returns additional rn column in AbstractJPASQLQuery#list(Expression projection), which results in

java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysema.query.types.ConstructorExpression.newInstance(ConstructorExpression.java:162)
at com.mysema.query.jpa.sql.AbstractJPASQLQuery.getResultList(AbstractJPASQLQuery.java:191)

This issue is observed in QueryDSL 3.1.1, 3.2.0

timowest added a commit that referenced this issue Jun 9, 2013
@timowest
Copy link
Member

@timowest timowest commented Jun 26, 2013

Released in 3.2.1

@timowest timowest closed this Jun 26, 2013
@timowest timowest added this to the 3.2.1 milestone Apr 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants