ios - Core Data constraint with "includesPropertyValues" -


i make more efficient fetch on core data entities , have query. want delete large amount of records (millions).

my logic is:

  1. fetch records entity
  2. delete fetched records.
  3. to improve fetching,

i set following constraint:

fetch.includespropertyvalues = no; 

my question is: relationships (which kept properties in managed objects) deleted?

yes, if delete managed object, relationship delete rules apply regardless of flag.

with many records might want want process instances in batches. use setfetchlimit: subset of instances, delete those, save changes, , repeat until no more instances found.


Comments