• 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: CoreData Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData Question


  • Subject: Re: CoreData Question
  • From: Keary Suska <email@hidden>
  • Date: Tue, 03 Jun 2014 06:49:13 -0600

On Jun 2, 2014, at 7:38 PM, Laurent Daudelin wrote:

> I have what I think is a simple CoreData question.
>
> Suppose I have an Employee table and a City table, a little bit like the CoreData documentation. Each employee resides in a city.
>
> Now, multiple employees can reside in the same city. Suppose I fetch a certain number of employees, how do I find how many cities this group of employees reside in?

-[NSFetchRequest setReturnsDistinctResults:]

I don't know whether any of the KVC aggregation operators work in fetch predicates--they are not documented to--but worst case you just get the result array count.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >CoreData Question (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: Re: universal app - with iPad disabled
  • Next by Date: iOS - NSOperation/NSOperationQueue Question
  • Previous by thread: CoreData Question
  • Next by thread: Re: CoreData Question
  • Index(es):
    • Date
    • Thread