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

SQL 'IN' clause fails with Empty Set #1003

dzag1600 opened this issue Oct 10, 2014 · 0 comments

SQL 'IN' clause fails with Empty Set #1003

dzag1600 opened this issue Oct 10, 2014 · 0 comments


Copy link

@dzag1600 dzag1600 commented Oct 10, 2014

I have found that the following code causes an illegal argument exception:

SQLQuery q = ...
RelationalPathBase<?> table = ...
NumberPath col = table.col;
Collection longs = new LinkedList(); //This list is empty

AbstractSQLQuery.class - 357: throw new IllegalArgumentException("Expected " + objects.size() + " paths, but got " + constantPaths.size());

In this case, objects.size() = 0 and constantPaths.size() = 1

The prepared statement supplies an empty list ('where table.col in ()') but the setParameters method still expects a parameter for the 'in' list.

@timowest timowest added the bug label Oct 10, 2014
@timowest timowest added this to the 3.5.1 milestone Oct 11, 2014
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.

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