-
Notifications
You must be signed in to change notification settings - Fork 495
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
Delete items by predicate #596
Comments
@nechesa can you provide an example of how it worked in v2? |
v2 have an opportunity to remove document by link, link created UriFactory etc, but also FeedResponse can be cast as Document class which have a SelfLink property
|
Hello @j82w so, what we can expect with this issues ? Because i guess it's important case, when you need to remove some documents by predicate. Thank you for attention. |
Hi @nechesa, Does this work for your scenario?
|
Thank you, I'll check it tomorrow and let you know. |
Depending on your predicate you might also be able to use stored procedures. |
Thank you for helping @j82w but code you send is buggy |
Every object in Cosmos has an "id" property. It's a required field. I have a few ideas, but I want to validate them first. I'll post an update later today after I get a chance to do some testing. |
Here is my current solution. I validated that it works. A solution closer to what you currently have will be possible after PR #604 is merged.
|
Thank you |
Id as a partitionkey value, really? that's a partition per entity, does not scale |
@vip32 there is valid scenarios where users don't need to scale and that the data set will always be small. The example can be modified to return multiple values for both an id and a partition key value. |
There is no way to remove items from container by predicate. It issue was resolver by used prev version by with Document class and its properties SelfLink with DeleteDocumentAsync. But is any opportunity to do it in new version. I can't find something similar in newest version.
Thank you for attention.
The text was updated successfully, but these errors were encountered: