Yes, it is possible to apply NSBatchDeleteRequest on entities that contain relationships with delete rules. However, you need to be aware of the delete rules in your data model and how they might impact the deletion operation.
For example, if you have a one-to-one or one-to-many relationship where the delete rule is "cascade," then the related entities will also be deleted when the parent entity is deleted via NSBatchDeleteRequest.
On the other hand, if the delete rule is "nullify," then the related entities will not be deleted, but their relationship values will be set to null.
So, it's important to understand your data model and its delete rules before using NSBatchDeleteRequest.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-07-16 11:00:00 +0000
Seen: 9 times
Last updated: Oct 20 '22