Re: Object exclusion
Re: Object exclusion
- Subject: Re: Object exclusion
- From: Bill Cheeseman <email@hidden>
- Date: Sat, 03 Sep 2005 15:20:56 -0400
on 2005-09-03 1:16 PM, Marcus S. Zarra at email@hidden wrote:
> In Core Data, is there a way to exclude an object from a fetch?
>
> For instance, I created a new object and I want to see if another
> object already exists with the same "unique" field. Right now I am
> searching on that field and then looping through the results looking
> for my new object to exclude it.
>
> Is there an easy way to add this as a predicate to the fetch to avoid this
> loop?
There's a snippet of code somewhere in the Core Data documentation that
shows how to use a fetch to find out if a managed object exists.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden