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

Add a note on MongoDB Panache doc about query on same field #13804

Merged
merged 1 commit into from
Feb 4, 2021

Conversation

loicmathieu
Copy link
Contributor

Relates to #12086 that we keep open to maybe fix it some day.

@loicmathieu
Copy link
Contributor Author

/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]).
Copy link
Member

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.

Copy link
Contributor Author

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).

Copy link
Contributor Author

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.

Copy link
Contributor Author

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 ?

@@ -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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here.

@loicmathieu loicmathieu force-pushed the doc/note-on-mongodb-query branch from 42cd1ba to 983192b Compare December 21, 2020 11:32
@gsmet gsmet merged commit 02975f3 into quarkusio:master Feb 4, 2021
@ghost ghost added this to the 1.12 - master milestone Feb 4, 2021
@loicmathieu loicmathieu deleted the doc/note-on-mongodb-query branch June 25, 2021 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants