Skip to content

Query by Example StringMatcher binds ValueFunction instead of resolved String value #2317

Description

@w8854123

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:

WHERE code LIKE '%abc%'

Environment

Spring Boot: 4.1.0
Spring Data JDBC: 4.1.0
Database: PostgreSQL
JDK: 25

Metadata

Metadata

Assignees

Labels

type: regressionA regression from a previous release

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions