Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Michael-AT-Corporation opened this issue Jan 10, 2025 · 1 comment
Labels
area/spring Issues relating to the Spring integration kind/bug Something isn't working

Comments

@Michael-AT-Corporation
Copy link

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

@Michael-AT-Corporation Michael-AT-Corporation added the kind/bug Something isn't working label Jan 10, 2025
@quarkus-bot quarkus-bot bot added the area/spring Issues relating to the Spring integration label Jan 10, 2025
Copy link

quarkus-bot bot commented Jan 10, 2025

/cc @aureamunoz (spring), @geoand (spring)

@Michael-AT-Corporation Michael-AT-Corporation changed the title Spring Data API Extension not allowinf 'Or' and 'And' in the method name Spring Data API Extension not allowing 'Or' and 'And' in the method name Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/spring Issues relating to the Spring integration kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant