I have a one-to-many CoreData model. There are tasklists and tasks belonging to the tasklists. My problem is that whenever I create a new task, a tasklist is also created.

"new tasklist" is the default value of the name field in the db. "New tasklist" is the value stored by the View when it creates a new tasklsit. As can be seen, every time a task is created, a tasklist with the default name value is automatically created.
Question Is this how it is supposed to look? If so, how do I do a query to pick only the tasklist names where Z_ENT = 1 (those are the parents, right?) If this looks very wrong, how do I insert stuff correctly. I think my table relationships are correct - but if that might be the problem, I ll post screenshots.
Model Diagram

My Code
When a list is selected:
NSManagedObject *managedObject = [self.fetchedResultsController objectAtIndexPath:indexPath];
TaskViewController *taskViewController = [[TaskViewController alloc] init];
taskViewController.managedObjectContext = [self.fetchedResultsController managedObjectContext];
taskViewController.tasklist = managedObject;
In the TaskViewController, I get the fetchedResultsController like this:
NSPredicate *predicate = [NSPredicate predicateWithFormat:
@"(tasklistOfTask == %@)", tasklist];
[fetchRequest setPredicate: predicate];
NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:self.managedObjectContext sectionNameKeyPath:nil cacheName:@"Root"];
aFetchedResultsController.delegate = self;
self.fetchedResultsController = aFetchedResultsController;
and then to insert,
NSManagedObjectContext *context = [self.fetchedResultsController managedObjectContext];
NSEntityDescription *entity = [[self.fetchedResultsController fetchRequest] entity];
NSManagedObject *newManagedObject = [NSEntityDescription insertNewObjectForEntityForName:[entity name] inManagedObjectContext:context];
[newManagedObject setValue:@"dummy" forKey:@"task"];
[newManagedObject setValue:tasklist forKey:@"tasklistOfTask"];
the managedobjectcontext is passed in from AppDelegate.
