SQL : Single column projection with UNION fails

Bug #772188 reported by Timo Westkämper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Querydsl
Fix Released
Undecided
Unassigned

Bug Description

SQLSubQuery sq1 = new SQLSubQuery().from(table1).leftJoin(table1.fieldFk, table2)
(some wheres)
SQLSubQuery sq2 = new SQLSubQuery().from(table1).leftJoin(table1.fieldFk, table2)
(some wheres)

ListSubQuery<MyBean> L1 = sq1.list(Projections.constructor(MyBean.class,<LIST OF FIELDS>));
ListSubQuery<MyBean> L2 = sq2.list(Projections.constructor(MyBean.class,<LIST OF FIELDS>));

With that, i try:

query().union(entradas, salidas).list()

and i'm getting the following exception:

java.lang.ClassCastException: java.math.BigDecimal cannot be cast to es.XXXX.MyBean

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

Released in 2.2.0-beta4

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.