Constructor generated by query projection ignores primitives

Bug #806838 reported by Marc Walter on 2011-07-07
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) on 2011-07-07
description: updated

Fixed in SVN trunk.

Changed in querydsl:
status: New → Fix Committed

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  Edit
Everyone can see this information.

Other bug subscribers