Problem fetching subentities
Problem fetching subentities
- Subject: Problem fetching subentities
- From: Eric Morand <email@hidden>
- Date: Tue, 13 Jun 2006 15:16:59 +0200
Hi List,
I have a model which contains the following entities :
SmartGroup <- SystemSmartGroup
SystemSmartGroup is a subentity of SmartGroup. Each one has its own
obj-c class.
When I want to fetch only SystemSmartGroup, the results also contain
instances of SmartGroup.
Here is the code I use to fetch :
[...]
NSArray * results = nil;
NSFetchRequest * fetchRequest = [[[NSFetchRequest alloc] init]
autorelease];
NSEntityDescription * entityDescription = [NSEntityDescription
entityForName:@"SystemSmartGroup" inManagedObjectContext:context]; //
context is correctly defined
[fetchRequest setEntity:entityDescription];
results = [context executeFetchRequest:fetchRequest error:nil];
[...]
Is this the normal behavior ? If so, what am I supposed to do to
retrieve only instances of SystemSmartGroup ?
Thanks,
Eric.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden