Binding tablecolumn to attribute of specific object in to-many relationship?
Binding tablecolumn to attribute of specific object in to-many relationship?
- Subject: Binding tablecolumn to attribute of specific object in to-many relationship?
- From: Sean McBride <email@hidden>
- Date: Tue, 29 Mar 2011 17:57:04 -0400
- Organization: Rogue Research Inc.
Hi all,
Consider a Core Data app, with Employee and Department entities. The
Employee entity has 'name' and 'number' attributes. Department has a to-
many relationship to Employees.
I need a tableview of departments, where one column should show the
'name' of the employee who's 'number' is 0. The table needs to update
when an employee's 'name' or 'number' changes, or when employees are
added/removed from a department's employees relationship.
What's the best way to do this?
I've considered adding a optional transient to-one relationship to
Department named 'employeeId0' and binding the tablecolumn to
departmentsArrayController>arrangedObjects>employeeId0>name, but maybe
I'm barking up the wrong tree....
Thanks,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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