Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coredata schema question.




On May 31, 2005, at 9:09 PM, James Andrews wrote:

My first question. I have a Categories Entity. I want to be able to have categories that are children of categories. I am not sure how to build a relationship for this. Suggestions on how to do it, and explanations on why you would do it that way would greatly appreciated.

Just create a relationship on Category with a target entity of Category. It will point to itself.



I want to be able to link Photographs to Albums, and want to be able to put the same image in multiple Albums. I had thought maybe another Entity between Albums and Photographs, but I am not sure if that would work the way I would expect it too.

Create a to-many relationship on Photograph that points to the Albums entity (you probably actually want to call this "Album"). Core Data will handle the rest.



- Scott

--
http://theocacao.com/
feed://theocacao.com/index.rss


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Coredata schema question. (From: James Andrews <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.