Re: Doing a NSFetchRequest on a single NSManagedObject
Re: Doing a NSFetchRequest on a single NSManagedObject
- Subject: Re: Doing a NSFetchRequest on a single NSManagedObject
- From: mmalcolm crawford <email@hidden>
- Date: Sat, 6 Aug 2005 11:44:22 -0700
On Aug 6, 2005, at 11:21 AM, Charilaos Skiadas wrote:
And you probably want to check to make sure that there is no
multiple selection etc.
See <http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Protocols/NSPlaceholders.html> and in
particular <http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Functions/AppKitFunctions.html>
(NSIsControllerMarker).
To return to the original question, it's not clear why you want to
use a fetch request rather than simply filtering the relationship in
memory?
NSSet *tasks = [project valueForKey:@"tasks"];
NSPredicate *predicate = [NSPredicate
predicateWithFormat:@"completedDate = NIL"];
NSArray *uncompletedTasks = [[tasks allObjects]
filteredArrayUsingPredicate:predicate];
mmalc
_______________________________________________
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