Thanks for the quick reply Ben and your explanation of what's going on.

I've just re-read the Fetching section of the Core Data Programming Guide and its glaring at me not to fetch using transient attributes.

I appreciate your help.

Jon


On 23 May 2008, at 22:32, Ben Trumbull wrote:

As a summary, you can't fetch or sort against transient properties reliably. They don't exist in the persistent store (database).

The in memory filtering will apply your predicate to any dirty objects to reconcile unsaved changes with the results from the persistent store.

So saving the store has turned all my file objects into faults.

Not exactly, the managed objects are marked clean (not dirty) after saving. Since the objects are no longer dirty, the MOC's filtering will not post process them for unsaved changes.

How can I work around this? I could always walk the tree and ask each
file if they're edited, but a fetch seems cleaner.

You should probably keep an NSSet of "edited" objects. Alternatively, you could make it a persistent property and manage the consequences of that.
--

-Ben

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to