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

[BUG] JDQL queries with like operator not working #540

Closed
m4ttek opened this issue Aug 9, 2024 · 5 comments
Closed

[BUG] JDQL queries with like operator not working #540

m4ttek opened this issue Aug 9, 2024 · 5 comments
Assignees
Labels

Comments

@m4ttek
Copy link

m4ttek commented Aug 9, 2024

Which JNoSQL project the issue refers to?

JNoSQL (Core)

Bug description

There is no way I can use @Query annotation properly with LIKE queries with params.

For example:

    @Query("where employeeName LIKE ?1 OR employeeSurname LIKE ?1")
    Page<EmployeeWorkflowContext> searchByPhrase(@Param("phrase") String phrase,
                                                 @NotNull PageRequest pageRequest,
                                                 @NotNull Order<EmployeeWorkflowContext> order);

It results in error while invoking:

WARNING: An exception mapping did not successfully produce and processed a response. Logging the exception propagated to the default exception mapper.
org.eclipse.jnosql.communication.QueryException: line 1:24 mismatched input '?' expecting STRING

It doesn't matter if I use named parameter or not - it's expecting string after "like":

JNoSQL Version

1.1.1

Steps To Reproduce

  1. Create a Repository with custom @query method
  2. Use "LIKE" operator for this method with interpolated parameter.
  3. Invoke this method

Expected Results

No response

Code example, screenshot, or link to a repository

No response

@m4ttek m4ttek added the bug label Aug 9, 2024
@otaviojava otaviojava self-assigned this Aug 9, 2024
otaviojava added a commit that referenced this issue Aug 9, 2024
[BUG] JDQL queries with like operator not working #540
@otaviojava
Copy link
Contributor

Hey @m4ttek could you check it with SNAPSHOT?

@m4ttek
Copy link
Author

m4ttek commented Aug 9, 2024

Unfortunately, still not working on 1.1.2-SNAPSHOT
image

@otaviojava
Copy link
Contributor

I got it; it generates once a day.
I am generating it for you.

@m4ttek
Copy link
Author

m4ttek commented Aug 9, 2024

Yes, and now it's working!

@otaviojava
Copy link
Contributor

Thank you @m4ttek closing thi sissue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants