Hi Olivier

> I create an object and insert it into the context, then i update a couple
> properties.
> 
> Later I i do a fetch request with a predicate on the property i updated
> after the insertion. If i do this fetch right after the update of the
> property (using the accessors provided by coreData), then the fetch does not
> find the object I created. If i wait longer then it finds it.
> 
> Is there a way to "commit" the change so that the fetch will find the object
> without saving. I don't want to save every time i update a property.

Since a fetch request returns fully saved objects, I can't see how you can 
expect it to see unsaved changes.

Think about it in database terms - you wouldn't expect a SQL statement to 
return anything other than committed rows. Essentially Core Data is an "OO 
database" and, unless you write your own caching, I doubt if you are going to 
get what you want without saving.

Joanna

--
Joanna Carter
Carter Consulting

_______________________________________________

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