• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problem fetching subentities
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: An Octal number into a Textfield
  • Next by Date: NSDocument and dealloc
  • Previous by thread: Re: An Octal number into a Textfield
  • Next by thread: NSDocument and dealloc
  • Index(es):
    • Date
    • Thread