Skip to content

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

Open

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

Activity

  1. self-assigned this
    on Jun 16, 2026
  2. dafriz commented on Jun 19, 2026

    @dafriz

    Also in 3.5.12 with 13ca647

  3. changed the title [-]Spring Data JDBC 4.1.0 QBE StringMatcher binds ValueFunction instead of resolved String value[/-] [+]Query by Example `StringMatcher` binds `ValueFunction` instead of resolved `String` value[/+] on Jul 1, 2026
  4. added this to the 4.0.7 (2025.1.7) milestone on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions