Constructor generated by query projection ignores primitives

Bug #806838 reported by Marc Walter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Querydsl
Fix Released
Undecided
Unassigned

Bug Description

When Querydsl generates a constructor using the annotation @QueryProjection Java primitives are converted into corresponding wrapper types. When the constructor is called a NoSuchMethodException occures because the generated constructor call does not match with the constructor annotated with @QueryProjection.

Example:
@QueryProjection
public SomeDto(final Long param1, final int param2, final int param3, final Long param4, final String param5)

Generated constructor call:
public QSomeDto(NumberExpression<Long> param1, NumberExpression<Integer> param2, NumberExpression<Integer> param3, NumberExpression<Long> param4, StringExpression param5) {
    super(SomeDto.class, new Class[] {Long.class, Integer.class, Integer.class, Long.class, String.class}, value1, value2, value3, value4, value5);
}

Marc Walter (m-walter-b)
description: updated
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Fixed in SVN trunk.

Changed in querydsl:
status: New → Fix Committed
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Released in 2.2.0

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.