When using Query By Example (QBE) with string matchers such as:
contains()
startsWith()
endsWith()
the generated SQL is correct, but the query always returns no results.
After enabling TRACE logging, it appears that a ValueFunction lambda object is being bound as the JDBC parameter instead of the resolved String value.
This causes the database to execute something equivalent to:
WHERE code LIKE 'org.springframework.data.relational.core.query.ValueFunction$$Lambda...'
instead of:
Environment
Spring Boot: 4.1.0
Spring Data JDBC: 4.1.0
Database: PostgreSQL
JDK: 25
When using Query By Example (QBE) with string matchers such as:
the generated SQL is correct, but the query always returns no results.
After enabling TRACE logging, it appears that a ValueFunction lambda object is being bound as the JDBC parameter instead of the resolved String value.
This causes the database to execute something equivalent to:
instead of:
Environment