Skip to content

Spring Data API Extension not allowing 'Or' and 'And' in the method name #45511

Open
@Michael-AT-Corporation

Description

Describe the bug

Having a function like

List<Parent> findAllByNameAndDetailOrMessage(String name, String detail, String message);

causes

Caused by: io.quarkus.spring.data.deployment.UnableToParseMethodException: 'And' and 'Or' clauses cannot be mixed in a method name - Try specifying the Query with the @Query annotation. Offending method is 'findAllByNameAndDetailOrMessage' of repository 'at.atc.database.repository.ParentRepository'.

In Spring a method name like that is allowed.
I don't know if this is intentionally not supported but i could not find it in the documentation.

Expected behavior

Query can be parsed.

Actual behavior

No response

How to Reproduce?

QuarkusReproducerJPAQueryMethodOrAnd.zip
Run the reproducer using: clean compile quarkus:dev This should cause the exception.

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

3.17.6

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area/springIssues relating to the Spring integrationkind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions