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

Usage of In operator with emptyList [DATAJDBC-604] #826

Closed
spring-projects-issues opened this issue Sep 21, 2020 · 2 comments
Closed

Usage of In operator with emptyList [DATAJDBC-604] #826

spring-projects-issues opened this issue Sep 21, 2020 · 2 comments
Assignees

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Sep 21, 2020

benzen opened DATAJDBC-604 and commented

Using postgres as a DB

Given an Entity named person. Person have an id and a name.

Doing the following

personRepostory.findByIdIn(anEmptyList);

Will result in a postgres exception about badly defined request.

I expect spring data jdbc to provide a way to support this kind of usecase


Issue Links:

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Sep 22, 2020

Mark Paluch commented

Linked a related issue in Spring Data R2DBC.

Since most databases don't support empty IN lists, we would render a false condition for IN and a true condition for NOT IN (1=0 respective 1=1)

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Sep 22, 2020

Mark Paluch commented

That's fixed now

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

Successfully merging a pull request may close this issue.

None yet
2 participants