-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Mongodb regex query not working with IN operation #41840
Comments
/cc @loicmathieu (mongodb) |
The issue is happening because panache is wrapping my This is the query panache is generating |
I've also debugged the issue a little bit, it seems that this line is putting the quotation around the value even though it shouldn't
The line can be found in the |
Should I create a PR that checks if the string var10000 is prefixed by |
@minhaz1217 yes please, open a PR |
@loicmathieu I'm on it. |
@loicmathieu Should I consider something like I can do this by matching |
I don’t think testing if the string starts with / will fly. |
We can use the LIKE keyword and if the passed value is of collection or array type then we can just not wrap the value with |
Regex should use |
I've tried to debug and see if I can modify the normal So modifying |
Describe the bug
When I try to query the db using an IN operation with panache query it doesn't work. It doesn't return results.
Expected behavior
The IN query should work
Actual behavior
The IN query doesn't generate a response.
How to Reproduce?
Steps to reproduce
find("emails IN ?1", "/something/").list()
in any field it doesn't workOutput of
uname -a
orver
Microsoft Windows [Version 10.0.19045.4529]
Output of
java -version
java version "21.0.2" 2024-01-16 LTS Java(TM) SE Runtime Environment (build 21.0.2+13-LTS-58) Java HotSpot(TM) 64-Bit Server VM (build 21.0.2+13-LTS-58, mixed mode, sharing)
Quarkus version or git rev
3.12.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.7 (8b094c9513efc1b9ce2d952b3b9c8eaedaf8cbf0) Maven home: C:\Users\HA HA.m2\wrapper\dists\apache-maven-3.9.7-bin\33482774\apache-maven-3.9.7 Java version: 21.0.2, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-21 Default locale: en_IN, platform encoding: UTF-8 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Additional information
I've created a sample project to regenerate the issue.
It can be found here
https://github.com/minhaz1217/java-quarkus/tree/master/mongodb-regex-in-list-query-panache
The text was updated successfully, but these errors were encountered: