New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

union of single ListSubQuery fails #444

Closed
timowest opened this Issue Jun 18, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@timowest
Member

timowest commented Jun 18, 2013

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));

timowest added a commit that referenced this issue Jun 18, 2013

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jun 26, 2013

Member

Released in 3.2.1

Member

timowest commented Jun 26, 2013

Released in 3.2.1

@timowest timowest closed this Jun 26, 2013

@nyc2

This comment has been minimized.

Show comment
Hide comment
@nyc2

nyc2 Jun 27, 2013

This works now, thanks.

nyc2 commented Jun 27, 2013

This works now, thanks.

@timowest timowest added this to the 3.2.1 milestone Apr 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment