I have used core data in my ios app. Now i have one table in which there are two columns .
- Category 
- Order (In which there are NSNumber 1, 2 ,5) 
I want to fetch data so It will first sort alphabetically by Category name and than by Order Number.
I have used below code :
NSEntityDescription *entity_Maintness = [NSEntityDescription
                                             entityForName:@"Maintness" inManagedObjectContext:__managedObjectContext];
    [fetchRequest_Maintness setEntity:entity_Maintness];
    NSSortDescriptor *sortDescriptor1 = [[NSSortDescriptor alloc] initWithKey:@"type" ascending:YES];
    NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"serialNumber" ascending:NO];
    NSArray *sortDescriptors12 = [[NSArray alloc] initWithObjects:sortDescriptor1, sortDescriptor, nil];
    [fetchRequest_Maintness setSortDescriptors:sortDescriptors12];
But the data are sorted only by Category not by Serial Number.
Thanks for Help.
