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

No support for $[<identifier>] / arrayFilters right? #1862

Open
chrisdejager opened this issue Sep 14, 2018 · 7 comments
Open

No support for $[<identifier>] / arrayFilters right? #1862

chrisdejager opened this issue Sep 14, 2018 · 7 comments
Projects

Comments

@chrisdejager
Copy link

Can't seem to find any reference. Although it is part of 3.6+ ... https://docs.mongodb.com/manual/reference/operator/update/positional-filtered/

Would love to see it implemented, but I can use workarounds for now :)

@alcaeus
Copy link
Member

alcaeus commented Sep 17, 2018

Correct, there is no support for those yet. We'll support them in 2.x once we're done with the driver switch.

@alcaeus alcaeus added this to the 2.x milestone Sep 17, 2018
@alcaeus alcaeus added this to 2.1 in Roadmap Sep 17, 2018
@alcaeus alcaeus moved this from 2.1 to 2.x in Roadmap Nov 5, 2019
@matpo
Copy link

matpo commented Jan 8, 2021

2 years and half later, any news about integration of arrayFilters ?

@alcaeus
Copy link
Member

alcaeus commented Jan 8, 2021

Nope. I experimented using them for collection updates, but that would require a significant overhaul (read "rewrite") of the persister logic which I didn't find the time for.

Obviously, the first step would be to add support for this in the query builder. I'm interested in your use-case: what would you like to use it for, do you use it already (e.g. by sending updates through the driver itself), etc. Maybe we can find a quick way to get that into 2.2. Ironically, one of the reasons I didn't get around to building anything is that I stopped using the ODM 2 years ago when I joined MongoDB, hence my question about your use-case to come up with an API for this.

@matpo
Copy link

matpo commented Jan 8, 2021

Thank you for your answer.

My use case is to replace an array value with a single query (like that: https://stackoverflow.com/a/58973094/6911841).
In the mean time I make two separates queries, one pull and one push, that is not very optimal.

@alcaeus alcaeus removed this from the 2.x milestone Aug 5, 2021
@spiider8
Copy link

Hi, anything change in this issue pls? Thanks

@Alaarafeh
Copy link

Alaarafeh commented Mar 1, 2023

Hi
accually right now there is only workaround array filter given as array parameter in getQuery

@spiider8
Copy link

spiider8 commented Mar 2, 2023

Ok and can you show me an example of this workaround pls? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Roadmap
2.x (future scope)
Development

No branches or pull requests

5 participants