magicalpanda/MagicalRecord — Issue #134: Question: Multiple Entities in one NSFetchedResultsController
Author: bliblablo
Created: 2012-01-20 13:10:57+00:00
State: open

Hello,
I don't know if this question is specific to MagicalRecord or if it is a CoreData question.

What I am trying to archive is to represent a folder-structure with subfolders and files.

If love to have an NSFetchedResultsController with two sections.
First: subfolders
Second: files

I can make two seperate NSFetchedResultsController by doing something like this:
NSFetchedResultsController* subFolderFetchedResultsController = [Folder fetchAllSortedBy:@"folderName" ascending:YES withPredicate:[NSPredicate predicateWithFormat:@"parent == %@", folder] groupBy:nil delegate:self];

and

NSFetchedResultsController* filesFetchedResultsController = [File fetchAllSortedBy:@"folderName" ascending:YES withPredicate:[NSPredicate predicateWithFormat:@"folder == %@", folder] groupBy:nil delegate:self];

but i'd prefer to have just one NSFetchedResultsController.
Is there any solution on how i can make this working?

Thanks, Georg