Re: Forcing Core Data to save attribute changed behind its back?
Re: Forcing Core Data to save attribute changed behind its back?
- Subject: Re: Forcing Core Data to save attribute changed behind its back?
- From: Sean McBride <email@hidden>
- Date: Tue, 24 Jul 2012 14:27:39 -0400
- Organization: Rogue Research Inc.
On Tue, 24 Jul 2012 05:31:22 -0700, Sixten Otto said:
>> when I change it, instead of the usual setAttribute:newValue I mutate
>the object directly.
>> - will/didChangeValueForKeyPath: but that's not a sufficient 'kick'
>
>Out of random curiousity, does this big mutable object you're updating
>change in a way Core Data would see?
Apparently not, that's the problem. :)
>Does the object's "before" state
>-isEqual: its "after" state?
Yes. My object is a subclass of NSObject and I don't override isEqual:. As I test, I overrode it and always return NO. At first, I thought this did the trick, since Core Data passed through this and saved properly; but alas, it only seems to go through the path once after the document is opened, not every time I ask it to save.
Thanks,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden