CoreData - Turning to-many relationship back into a fault
CoreData - Turning to-many relationship back into a fault
- Subject: CoreData - Turning to-many relationship back into a fault
- From: Andrew Bush <email@hidden>
- Date: Fri, 2 Feb 2007 09:20:52 +1300
Hi all,
I am using a background thread to fetch some data using coredata,
as suggested in the docs I pass this thread a list of objectIDs for
the objects I want to fetch, I get the list of objectIDs each time
by calling:
[historyItems addObjectsFromArray:[[item
valueForKeyPath:@"history.objectID"] allObjects]];
in the debugger, I can see that the first time this is called it
faults a to-many relationship.
CoreData: annotation: sql execution time: 0.000878s
2007-02-01 19:55:53.822 TaskTrack[2685] CoreData: annotation: to-
many relationship fault "history" for objectID 0x5283440 <x-
coredata://6E1FB861-D552-4A0F-9561-E25EA926BA0F/applications/p6>
fulfilled from database. Got 34 rows
the next time, and everytime after that it does not.
unfortunately this means that over time I am getting an incorrect
list of the item ids....more records are being added to the store
elsewhere relatively quickly and I would like that to-many
relationship to re-fault more than once.
Ive tried calling:
[moc refreshObject:item mergeChanges:NO];
[historyItems addObjectsFromArray:[[item
valueForKeyPath:@"history.objectID"] allObjects]];
but that appears to make no difference.
is there some way I can force coredata to fault that relationship
manually?
thanks for any help.
Yours cheerfully,
Andrew Bush
_______________________________________________
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