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: Core Data: unidirectional relationships




On Feb 13, 2008, at 11:59, Quincey Morris wrote:

What about:

Entity: Department
Attributes: ...whatever...
Relationships:
headOfDepartment --> Role
viceHeadOfDepartment --> Role
pointyHairedBoss --> Role
dilbert --> Role
other Employees -->> Employee

Entity: Role
Attributes: ...whatever...
Relationships:
department --> Department
employee --> Employee
(add role-type attribute or subclass Role if needed)

Entity: Employee
Attributes: ...whatever...
Relationships:
department --> Department
roles -->> Role

That's basically the same as your "ugly" version, just less ugly.

Er, NVM. I thought I had all the inverses covered, but I messed up the one that actually matters (Role.department). Fixing that would require subclassing Role, and where *that* would land on the ugliness scale is hard to predict.


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Core Data: unidirectional relationships (From: Ruotger Skupin <email@hidden>)
 >Re: Core Data: unidirectional relationships (From: Quincey Morris <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.