Hi guys
I've got a bit of a weird problem. I've got a one-to-one relationship between two entities in my Core Data model, called Trigger and View. (Before you jump on that, I've already tried renaming it, it's not a reserved word issue.)
Here's the extremely odd thing - I can't seem to traverse this relationship through KVC. Here's some code
WTF. Both objects were instantiated with the insertNewObjectForEntityForName:inManagedObjectContext: method of NSEntityDescription, and the view was assigned to the trigger by was of setValue:forKey:. The error I get is 'the entity Loop is not key value coding-compliant for the key "view.locX".'
I've got a bit of a weird problem. I've got a one-to-one relationship between two entities in my Core Data model, called Trigger and View. (Before you jump on that, I've already tried renaming it, it's not a reserved word issue.)
Here's the extremely odd thing - I can't seem to traverse this relationship through KVC. Here's some code
Code:
//this works
NSManagedObject* view = [trigger valueForKey:@"view"];
int locx = [[view valueForKey:@"locX"] intValue];
//this doesn't
int locx = [[trigger valueForKey:@"view.locX"] intValue];
WTF. Both objects were instantiated with the insertNewObjectForEntityForName:inManagedObjectContext: method of NSEntityDescription, and the view was assigned to the trigger by was of setValue:forKey:. The error I get is 'the entity Loop is not key value coding-compliant for the key "view.locX".'