Re: Fetch request problem with core data relationship and NSTableView
Re: Fetch request problem with core data relationship and NSTableView
- Subject: Re: Fetch request problem with core data relationship and NSTableView
- From: Felix Franz <email@hidden>
- Date: Fri, 15 Jun 2007 18:32:12 +0200
On Jun 15, 2007, at 6:08 PM, Danny Callanan wrote:
<SNIP>
- (void) awakeFromInsert
{
NSManagedObjectContext *moc = [self managedObjectContext];
NSFetchRequest *request = [[[NSFetchRequest alloc] init]
autorelease];
NSEntityDescription *entity = [NSEntityDescription
entityForName:@"Currency" inManagedObkectContext:moc];
[request setEntity:entity];
NSError *error = nil;
NSArray *tempArray = [moc executeFetchRequest:request error:&error];
[self setToCurrency:[tempArray lastObject]];
}
You have to call [super awakeFromInsert] before your own code (as
described in the documentation for NSManagedObject). Just a shot in
the dark ...
Cheers,
felix
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden