micronaut-projects / micronaut-data

Ahead of Time Data Repositories
Apache License 2.0
465 stars 197 forks source link

JDBC Repo Queries With Like & ILike Not Working #386

Closed recursivecodes closed 4 years ago

recursivecodes commented 4 years ago

Thanks for reporting an issue for Micronaut Data, please review the task list below before submitting the issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.

NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (http://stackoverflow.com/tags/micronaut) or Gitter (https://gitter.im/micronautfw/). DO NOT use the issue tracker to ask questions.

Task List

Steps to Reproduce

  1. Checkout The Project (https://github.com/recursivecodes/micronaut-data-book-jdbc)
  2. Run Test
  3. Observe Failed Test
  4. Uncomment BookRepository.java:18 and compile
  5. Observe compilation error

Expected Behaviour

Query using Like should return a List containing one element. Query using ILike should compile.

Actual Behaviour

Like query does not work properly and ILike query fails to compile.

Environment Information

Example Application

recursivecodes commented 4 years ago

FYI - I've tested and confirmed that both issues exist against Oracle DB as well as the H2 example attached here.

jameskleeh commented 4 years ago

The supported syntax is Ilike, not ILike

I'll submit a PR to your repo with that change as well as the usage of '%'

jameskleeh commented 4 years ago

https://github.com/recursivecodes/micronaut-data-book-jdbc/pull/1