I am using core data framework and want to fetch the data using relationship. I have 2 entities named User and Company having user_name and company_name field's. I also have relationship to-many name rel_user->user.
Now I am trying to fetch data like this
User *userObj=(User*)[selectedData objectAtIndex:indexPath.row];
NSSet *resultData = [userObj valueForKeyPath:@"rel_user.user"];
NSLog(@"subject -> %@",[resultData description]);
I want to show the company name related to user.