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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jun 26, 2013

Member

Released in 3.2.1

Member

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