I have a parent entity in my model called P. I also have a child entity called C. I'm using the entity inheritance feature built into Core data as this solves problems for me (from what I read and understand).
Here is my situation:
In an early version of my development, I created a number of records in the P entity. Later I added the C entity and set the Parent entity to P. C only contains a single attribute. Due to the design of the app, it is better to have entity inheritance than to include the attribute in the parent entity.
Looking at articles on the web and in Apple's documentation, I understand that an sqlite persistent store will be a single table with all attributes which can cause performance problems, but I accept this (for now).
Looking at this, it would seem that fetching all entries from C would return all the entries in P. I have found that is not the case. A bit of testing shows this seems to be happening:
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"C"];
request.predicate = predicate;
request.includesSubentities = YES;
NSManagedObjectContext *moc = self.managedObjectContext;
NSArray *results = [moc executeFetchRequest:request error:&error];
What you describe is what I would expect. Once you create an instance of entity P, it is not (and cannot become) an instance of entity C. So a fetch for entity C will never return those objects.
But, because entity C is a subentity of P, an instance of entity C is also an instance of entity P - albeit a "special" one with an extra attribute. So a fetch for entity P will (assuming you have set
includesSubentities to YES) return both C entities and (plain) P entities. (By way of example, if P were "Animals" and C were "Dogs", a Dog is an Animal, and so a fetch for Animals should include Dogs. But a fetch for Dogs should not include any other types of Animal.)
If you fetch an object using a fetch for P entities, and delete it, then the object - whether it is actually an instance of C or P - will be deleted and removed from the store. So it will no longer appear in a fetch for C entities or P entities.
So to answer your specific questions: