Caused by: java.lang.ClassCastException: com.mysema.query.types.query.SimpleSubQuery cannot be cast to com.mysema.query.types.expr.SimpleExpression
at com.mysema.query.sql.SQLSubQuery.union(SQLSubQuery.java:50)
at com.mysema.query.sql.SQLSubQuery.union(SQLSubQuery.java:54)
Code is as follows:
List<SubQueryExpression<Tuple>> subQueryExprs = new ArrayList<SubQueryExpression<Tuple>>();
for (...) {
SQLSubQuery subQuery = new SQLSubQuery().from(...)...;
subQueryExprs.add(subQuery.where(...).distinct().unique(...);
}
JPASQLQuery query = createQuery().from(new SQLSubQuery().union(subQueryExprs).as(subQueriesAlias));
The text was updated successfully, but these errors were encountered:
Code is as follows:
The text was updated successfully, but these errors were encountered: