Skip to content

NOT IN comparator is not working with Criteria API #177

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

Closed
rjaros opened this issue Sep 6, 2019 · 3 comments
Closed

NOT IN comparator is not working with Criteria API #177

rjaros opened this issue Sep 6, 2019 · 3 comments
Assignees
Labels
for: external-project For an external project and not something we can fix type: bug A general bug
Milestone

Comments

@rjaros
Copy link

rjaros commented Sep 6, 2019

This code:

client.delete().from("tab").matching(where("id").notIn(1, 2))

generates SQL statement without any conditions:

DELETE FROM tab

When combined with other conditions, an incorrect SQL statement is generated:

client.delete().from("tab").matching(where("pole").`is`(1).and("id").notIn(1, 2))

generates:

DELETE FROM tab WHERE tab.pole = $1 AND 

The IN comparator is working fine.

@mp911de mp911de added the type: bug A general bug label Sep 6, 2019
@mp911de
Copy link
Member

mp911de commented Sep 6, 2019

Looks like a bug in the Spring Data Relational (JDBC) project as we're using the SqlRenderer.

@mp911de mp911de added the for: external-project For an external project and not something we can fix label Sep 6, 2019
@schauder
Copy link
Contributor

This will get fixed by https://jira.spring.io/browse/DATAJDBC-410

schauder added a commit to spring-projects/spring-data-relational that referenced this issue Sep 11, 2019
mp911de pushed a commit to spring-projects/spring-data-relational that referenced this issue Sep 11, 2019
mp911de added a commit that referenced this issue Sep 11, 2019
mp911de added a commit that referenced this issue Sep 11, 2019
Add this. for field access.
@mp911de mp911de added this to the 1.0 RC1 milestone Sep 11, 2019
@mp911de
Copy link
Member

mp911de commented Sep 11, 2019

Fixed in Spring Data JDBC, added tests in Spring Data R2DBC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants