Not clear how to return multiple columns using SQL union()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Querydsl |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I am attempting to execute a UNION of three separate SQL queries as follows:
QQueues q = QQueues.queues;
QQueueDoctors qd = QQueueDoctors.
QAppointments a = QAppointments.
List<Object[]> rows = session.
session.
leftJoin(
leftJoin(
session.
leftJoin(
rightJoin(
session.
rightJoin(
rightJoin(
list();
Unfortunately, this query always returns 0 columns because UnionBuilder.list() won't allow me to specify which columns should be returned.
1. AbstractSQLQuer
2. iterateMultiple() invokes getMetadata(
As a result I end I with a List containing one element of zero columns even though it should have 3 columns. This bug is related to https:/
Fixed. The QueryMetadata instance of the first union child is now used.