Is it possible/allowed/supported to pass an NSManagedObject in the propertiesToUpdate dictionary of NSBatchUpdateRequest.
I keep getting this error:
Code Block obj-c MYManObjType* manObj = myManObject;/*Fetched using the same moc*/ NSBatchUpdateRequest* updateRqst = [NSBatchUpdateRequest batchUpdateRequestWithEntityName:@"relatedManObj"]; updateRqst.predicate = someValidPredicateDefinedElsewhere; updateRqst.propertiedToUpdate = @{@"myManObjRealtionship":manObj}; updateRqst.resultType = NSUpdatedObjectsCountResultType;... updateRqst.affectedStores = @[self.moc.persistentStoreCoordinator.persistentStores]; NSBatchUpdateResult* result = [self.moc executeRequest:updateRqst error:&err];
I keep getting this error:
But the relationship IS valid, and the 'assigned' object is of the correct type.
** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid relationship ...