On 2010 May 05, at 02:54, Tom Fewster wrote:

> the managed objects which contain transient values fault (didTurnIntoFault: 
> is called) and are recreated (awakeFromFetch is called), even though nothing 
> has changed, except for the contents of the transient attributes. This only 
> seems to happen on the first sync after the application is launched, 
> subsequent syncs doesn't fault the managed objects.

I don't know the answer to that exactly, but, particularly with an sqlite 
store, transient attributes have some exceptional behaviors.  Search the Core 
Data Programming Guide for 'transient'. 

> I have also noticed that the 
> NSManagedObjectContextObjectsDidChangeNotification notification is never 
> broadcast in this situation.

The documentation for NSManagedObjectContextObjectsDidChangeNotification 
contains alot of "fine print".  You might want to read it carefully.

> Therefore, anything that contains a reference to a managed object contains an 
> invalid reference, and I have no way of knowing when I need to update the 
> reference (I guess I could retain the MO and call isFault before each use, 
> but that doesn't seen nice)
> 
> - Is it expected behaviour...

You're using two features there, transient attributes and 
NSManagedObjectContextObjectsDidChangeNotification, which, in my experience, 
are problematic.  Might be a good time to see how Undo and Redo work.

Sorry I'm not being helpful.  My advice is to file bugs, and also try to avoid 
reliance upon these two features.




_______________________________________________

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