Why isnt this working...?
I have a 'Client' entity and a 'Car' entity in a core data model. It is a one-to-many relationship. I have chosen a 'Client' from a table view controller and pushed a new table view controller which should display all Cars that Client owns.
Based on information in other answers in StackOverflow, I have compiled the following short code to kick out the name of the cars to display in the cells of the table view controller:
NSSet *cars = client.cars;
carsArray = [cars allObjects];
Car *car = (Car *)[carsArray objectAtIndex:indexPath.row];
cell.textLabel.text = [car carName];
However, this is not working. Can anyone see why? It compiles fine. FYI - 'client' is the chosen client object; carsArray is a NSArray declared within the viewcontroller header file and a Car has a attribute called 'carName'.