Hi, If a Core Data to-one relationship is missing its target entity (and so throwing can't-fulfill-fault exceptions), how can I set the relationship to nil?
If I do object.missingObject = nil; or [object setValue: nil forKey: @"missingObject"]; Core Data throws (when it tries to maintain the inverse relationship i.e. remove object from missingObject.objects). If I do [object setPrimitiveValue: nil forKey: @"missingObject"]; Core data doesn't seem to know to save the object. At least that's what I think is going on - in any case the relationship is not nil-ed in the store. At present I have to delete the object (as the doc recommends), but I'd prefer to keep the object and just nil the broken relationship. I'd prefer to not discuss preventing the situation. Cheers, Steve ----- Avoid loud and aggressive persons for they are vexatious to the spirit - Desiderata _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com