• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Doing a NSFetchRequest on a single NSManagedObject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Doing a NSFetchRequest on a single NSManagedObject (From: Andrew Sage <email@hidden>)
 >Re: Doing a NSFetchRequest on a single NSManagedObject (From: Charilaos Skiadas <email@hidden>)
 >Re: Doing a NSFetchRequest on a single NSManagedObject (From: Andrew Sage <email@hidden>)
 >Re: Doing a NSFetchRequest on a single NSManagedObject (From: mmalcolm crawford <email@hidden>)
 >Re: Doing a NSFetchRequest on a single NSManagedObject (From: Charilaos Skiadas <email@hidden>)

  • Prev by Date: Re: Doing a NSFetchRequest on a single NSManagedObject
  • Next by Date: Re: perl string handle equivilents in cocoa
  • Previous by thread: Re: Doing a NSFetchRequest on a single NSManagedObject
  • Next by thread: Lazy NSTableView cell content fetching
  • Index(es):
    • Date
    • Thread