I have a Core Data entity with a transient property that is setup to lazy-load its value in an on-demand accessor. The value is an image which is loaded from file.

The issue: when the object is faulted (i.e. the fault fires), the accessor for my transient property gets called which ends up loading the image from file.

Presently, I'm overcoming this by calling [self isFault] in the on- demand accessor, and if it returns true, I simply return nil. This works but I'd like to know if there's a better way. Also, I remain confused as to why the accessor for my transient property gets called during faulting.

Kevin
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to