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
Indexes in sub-document for mongodb #2129
Comments
Indeed, this is not supported -> this is a feature request, not a bug report. |
Hi, @B4nan It works for
But nothing works for |
Fastest way to see this happen is sending a PR 🤷 |
@andrey-hohlov This works for a unique index, also with a sparse index if needed...
more #4495 |
Interesting, maybe this got fixed by some unrelated change over time. Will keep this open till we have some explicit tests for it so we can be sure it actually works (and it will remain working over time as well) |
Okay, this apparently works as expected, not sure what fixed it. Added tests to ensure it really works, will mark it as a feature commit so it gets into the changelog, although it will just add the test. |
Describe the bug
It seems that mikro-orm mondodb driver doesn't support sub-document indexing. That makes sense for SQL but it's common practice in mongodb. It looks like it's not possible to create an index like
myField.mySubField
.Now it could be because of how i've written the embedding that's it's not working.
Stack trace
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should be able to use a
.
notation in mongodb indexesAdditional context
My original problem arises when i tried to create a compound index with a sub-field and a field of a document.
Versions
The text was updated successfully, but these errors were encountered: