spring-data-relational icon indicating copy to clipboard operation
spring-data-relational copied to clipboard

findByXxxIn generates invalid SQL when the Collection is empty [DATAJDBC-567]

Open spring-projects-issues opened this issue 5 years ago • 1 comments
trafficstars

Veli-Pekka Muli opened DATAJDBC-567 and commented

The generated SQL is WHERE "myschema"."mytable"."mycolumn" IN ()


Affects: 2.0.1 (Neumann SR1)

spring-projects-issues avatar Jun 23 '20 06:06 spring-projects-issues

I am not able to reproduce it - If the passed Collection is empty, then generated SQL will be:

SELECT COUNT(*) FROM "schema"."table" WHERE 1 = 0

mipo256 avatar Sep 10 '21 12:09 mipo256