-
Notifications
You must be signed in to change notification settings - Fork 1.1k
InIgnoreCase
queries match on substrings
#4404
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
Comments
Thanks @zlaval for raising the issue. |
InIgnoreCase
queries match on substrings
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The generated query is not ok in case of using
in
expression withIgnoreCase
.Example:
I have a list of names and I would like to query for documents which name is in the list case insensitively.
Using
fun findAllByNameInIgnoreCase(names: List<String>)
creates the following mongo query:The problem it will also match to
Test Two Something
.This works just fine in case of
fun findByNameIgnoreCase(names: String)
, which generates this query:So i think this would be consistent if the generated query was:
This would results in the expected result, as the query method does not contains
Regex
expression even if mongo solves case insensivity with regex.The text was updated successfully, but these errors were encountered: