-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
RFC: Entity: update\remove by predicate #672
Comments
If you want to filter based on some predicate, why not find the ids based on the predicate and use them to remove items? |
Yes, I can do as you say, but I find this useful, to have this feature "out of the box". |
I'll take this one 😄 |
While implementing the Would it be clear if we let the option open to add multiple predicates at once? If it should be possible I would opt to accumulate all changes, but maybe this would raise some questions with users. For example:
|
Would be great to have this feature. However, I would argue that in favor of simple, atomic operations, you should only be able to pass one predicate per operation. The first signature that came to my mind would look like this:
So the changes would only be applied to entities that match a certain predicate which should be bound to the operation you are performing, not the change itself. To add another usecase (optimistic UI, image upload):
It would be great to be able to add a |
I'm submitting a...
What is the current behavior?
Current behaviour does not let us update or remove many entities by predicate.
Expected behavior:
There is often a need to update or remove by the way described.
So it would be great to have an ability to update\remove many entities this way:
Also some there are some cases that requires attention:
Other information:
Please look at the issue #671. It is tightly tied to this one, because it would be great to provide predicate and changes function at the same time.
The text was updated successfully, but these errors were encountered: