-
Notifications
You must be signed in to change notification settings - Fork 146
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
All positional operator $[]
throws JsonParseException
in 1.5.0
#386
Comments
You can add quotes around your key, the following test runs as expected
I’ve been trying to modify the query builder to accept the query without the quotes but it is quite tricky to do so without introducing a lot of complexity to the algorithm. Considering the doc you mentioned had those quotes I’m not sure we want to fix it. |
Thanks @Dayde. It's still surprising this works in Jongo 1.4.1, though. 🙂 |
Not really to me as the query factory was rewritten from scratch while updating to mongo legacy driver 4.x |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
After upgrading Jongo 1.5.0, we started seeing
JsonParseException
in a couple of places where we use all positional operator$[]
. Our usages are the same as the example in MongoDB doc.BsonQueryFactory#addRequiredQuotesAndParameters
seems like the culprit as it applies the following transformations, and thereforeBasicDBObject.parse
fails:My test case in
BsonQueryFactoryTest
:Failure:
Also, Jongo 1.4.1 returns the expected query:
The text was updated successfully, but these errors were encountered: