Skip to content
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

clone does not work properly for unions for sql #1096

dodgex opened this issue Dec 18, 2014 · 2 comments

clone does not work properly for unions for sql #1096

dodgex opened this issue Dec 18, 2014 · 2 comments


Copy link

@dodgex dodgex commented Dec 18, 2014

i have something like this:

SQLSubQuery sub1 = new SQLSubQuery();
ListSubQuery<Tuple> list1=sub1.list(...);

SQLSubQuery sub2 = new SQLSubQuery();
ListSubQuery<Tuple> list2=sub2.list(...);

SQLQuery query = ... ;

query.union(list1, list2);

the execution of this query works but when i do

SQLQuery query2 = query.clone() ;

i get when trying to execute the new query (firstUnionSubQuery == null)

java.lang.NullPointerException: null
    at com.mysema.query.sql.ProjectableSQLQuery.serialize( ~[querydsl-sql-3.5.0.jar:na]
    at com.mysema.query.sql.AbstractSQLQuery.list( ~[querydsl-sql-3.5.0.jar:na]
    at com.mysema.query.sql.ProjectableSQLQuery.list( ~[querydsl-sql-3.5.0.jar:na]

my code related to the cloned query works fine for querys that do not use union.

Copy link
Contributor Author

@dodgex dodgex commented Dec 18, 2014

it looks like here: should be another line like this.firstUnionSubQuery = query.firstUnionSubQuery;

@timowest timowest added this to the 3.6.1 milestone Dec 19, 2014
@timowest timowest closed this Dec 21, 2014
Copy link

@timowest timowest commented Jan 31, 2015

Released in 3.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.