NSBatchInsertRequest rejects all data if one object fails validation - can this behaviour be changed?

Hi,

I am using a batchInsertRequest: objects: call with iOS 14 to insert a bunch of records into a Persistent Container.

The Managed Object Model of my Container has a validation rule preventing a string attribute longer than 30 characters.

If even a single record fails this validation rule, none of the objects, not even the valid ones, get persisted.

Is there any way to adjust this behaviour so that only the objects that fail validation get rejected (while still using a batchInsertRequest)?

Thanks

Wolfe

You might consider disabling the validation rule and using a batch insert followed by a batch delete of objects that would have broken the rule.
NSBatchInsertRequest rejects all data if one object fails validation - can this behaviour be changed?
 
 
Q