-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add a note on MongoDB Panache doc about query on same field #13804
Conversation
/cc @evanchooly @FroMage |
@@ -513,6 +513,10 @@ Here are some query examples: | |||
- `lastname is not null` will be mapped to `{'lastname':{'$exists': true}}` | |||
- `status in ?1` will be mapped to `{'status':{$in: [?1]}}` | |||
|
|||
WARNING: MongoDB queries must be valid JSON documents, | |||
using multiple times the same field on a query is not allowed using PanacheQL as is it would generate an invalid JSON | |||
(see link:https://github.com/quarkusio/quarkus/issues/12086[this issue on github]). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid referencing an issue? Better put an example in the doc of what's not valid.
Btw, I think it's a pretty annoying limitation given it can be a very common use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, I think it's a pretty annoying limitation given it can be a very common use case.
That's why there is an open issue about it, so people can give feedback on it and maybe work on it. I think it's important to link to the openned issue as we could gather feedback about this issue and decide if we need to work on it (this would not be easy).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can off course add an example but I think the issue still needs to be linked here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gsmet what your takes on my previous comment ?
...s/panache/mongodb-panache/runtime/src/main/java/io/quarkus/mongodb/panache/package-info.java
Outdated
Show resolved
Hide resolved
@@ -85,6 +85,11 @@ | |||
* </ul> | |||
* </p> | |||
* <p> | |||
* <b>WARNING</b>: MongoDB queries must be valid JSON documents, | |||
* using multiple times the same field on a query is not allowed using PanacheQL as is it would generate an invalid JSON | |||
* (see this issue on github: https://github.com/quarkusio/quarkus/issues/12086). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here.
42cd1ba
to
983192b
Compare
Relates to #12086 that we keep open to maybe fix it some day.