-
Notifications
You must be signed in to change notification settings - Fork 812
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
docstore/memdocstore query for nested documents with slices does not work #3506
Comments
Can you send a PR with a fix? |
If this is expected to work, the test should be in |
I think #3508 should fix it. Let me know what you think. |
Thanks for the PR. It helped me understand this issue better. It is not a bugfix, it is a new feature. The docstore documentation about field paths is underspecified; it never says how they work. For maps and structs it's obvious, but not so for slices. I understand that MongoDB treats I just checked for Firestore and it doesn't support field selectors inside slices at all. I don't know what DynamoDB does, but I think Firestore is the only counterexample we need. The remaining question is: should we add this behind some option, so that people primarily using MongoDB can turn it on to test with memdocstore? I don't know if we do that elsewhere. I'd be OK with it, but @vangent has the final say. |
Ah i see. The mongodb driver supports that behavior a bit by accident. I like the option idea that would make it easier to test with the memdocstore when using only the mongodb driver. But its of course adding more complexity. |
I'm OK with adding an option to |
Sorry its a bit busy at the moment. |
I amended #3508 with a |
Describe the bug
Documents like
are not found by the following query:
This is working fine when using
docstore/mongodocstore
.To Reproduce
I forked this repository and added a unit test to show the issue eqinox76/go-cloud@7f3ef04.
Expected behavior
Find the document.
Version
v0.39.0
Additional context
eqinox76/go-cloud@7f3ef04 contains a potential fix. If it looks good to you i could make a pr.
The text was updated successfully, but these errors were encountered: