0

I've been trying to get this to work for a while now.

In my Core Data model I have:

Entity Company has a one to many relationship with Employee (employees)

Company.employees
Employee.age

Using bindings I would like to show the sum of age for all employees when clicking on a Company in a tableView.

I've tried variations of: @distinctUnionOfSets.employees.@sum.age, but can't get it to work.
When I try the above I get the error message: [<_NSFaultingMutableSet 0x10019c430> removeObserver:forKeyPath:] is not supported. Key path: @sum.age

My NSArrayController is bound to Client so in IB it looks like this: Clients.selection.@distinctUnionOfSets.employees.@sum.age

Any ideas?

Mikael
  • 3,572
  • 1
  • 30
  • 43

1 Answers1

0

I made this more complicated than it was. Added a new NSArrayController which was bound to Employee.

Mikael
  • 3,572
  • 1
  • 30
  • 43