to study core data I have created a master detail tableview, with Clients and Projects. Master view shows clients and detail view shows the projects related to a specific client. There is also an editing mode, in which you can edit the client or project name you've entered.
my problem begins when I am in editing mode in the project screen. When I select a record, it will go to a view where you can adjust the project name. When I go back to the project view, my record that I just edited is gone.
I am not able to upload pictures yet, so I will try to clarify like this:
Projects:
click "3" and change it to "3. three" when back in the projects view you will see:
This works for al records that are selected.
This does not happen in het master view. I have compared both file again and again, but there are no differences. (Only difference is that in Master view I will load al record using -(NSArray *)allClients method and in detail I load all records using an -(NSArray *)relatedProjects:(Client *)client method
In the project view controller I have this, and it is getting called (I've checked)
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[[self tableView] reloadData];
}
So hopefully someone can give me some pointers. Thank you!
I've found the problem. While passing project data to the edit screen, I forgot to pass the client data, so each time I edited a record, client became null and disapeared, since there was no relationship any more between client en project.