Core data and @unionOfSets
- by KevinD
Im having trouble using the @unionOfSets on my core-data objects.
NSLog(@"%@", [NSApp valueForKeyPath:@"delegate.mainWindowController.sidebarViewController.arrayController.selection.list.listElement"]);
Prints the set of listElements as expected
2010-03-24 18:11:15.844 Pirouette[7459:80f] Relationship objects for {(
(entity: PRPlaylistElement; id: 0x10a71b0 ; data: ),
(entity: PRPlaylistElement; id: 0x10ac7d0 ; data: ),
(entity: PRPlaylistElement; id: 0x10acf60 ; data: ),
(entity: PRPlaylistElement; id: 0x10a6850 ; data: )
However when I try to get the set of file objects for each of the list elements.
NSLog(@"%@", [NSApp valueForKeyPath:@"delegate.mainWindowController.sidebarViewController.arrayController.selection.list.listElement.@unionOfArrays.file"]);
I get the following error
2010-03-24 18:16:45.843 Pirouette[7505:80f] An uncaught exception was raised
2010-03-24 18:16:45.844 Pirouette[7505:80f] [<NSCFSet 0x10415e0> valueForKeyPath:]: this class does not implement the unionOfArrays operation.
2010-03-24 18:16:45.847 Pirouette[7505:80f] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[<NSCFSet 0x10415e0> valueForKeyPath:]: this class does not implement the unionOfArrays operation.'
Confused because I thought calling to-many relationships in core-data were NSSets.