On Feb 26, 2008, at 7:34 PM, Adam Gerson wrote:

Thanks for the example. What I am looking for is slightly diferent.
Lets say I have a entity called FavoriteWebsites with the attributes
name and url. The current contents of the object are

Name   |     URL
---------------------------------------------
Sam     |     http://www.aol.com
Adam   |     http://www.digg.com
Jane     |    http://www.ibm.com
John     |    http://www.aol.com

I want to filter for only the unique values of url, so the list I want
to get back for a separate table is

http://www.digg.com
http://www.ibm.com
http://www.aol.com

Core Data doesn't have a way for you to fetch a set of items based where a particular property will be distinct in the result set. You'll have to post-process the results.

Depending on what it is your are modeling, you can consider whether normalizing the URL into its own entity is the correct solution.

Jim


_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to