data fault

Tags ( )

What would cause a fault when fetching an entry?

for example, I'm getting things like this when fetching entries. The first is a normal entry, and the second says data fault.

MIEntryData: 0x4ce5e80 (entity: EntryData; id: 0x4ce5e50 x-coredata://336FF957-BFE1-4E2B-9365-C0AFD2398481/EntryData/p218 ; data: {
GTD = na;
attachmentCount = nil;
characterCount = nil;
checkbox = nil;
comment = nil;
context = nil;
creationDate = 2005-09-07 09:48:09 -0700;
dateDue = 2006-10-02 12:00:00 -0700;
dateLastCompleted = 2006-09-25 11:39:10 -0700;
descendantCount = nil;
dueDate = nil;
encrypted = nil;
entryDataID = 10;
flagged = nil;
hasNoteText = nil;
isFetchRequest = 0;
joinedEntries = (
0x4cb49c0 ,
0x4c1e2d0
);
kind = "com.apple.rtfd";
label = 1;
lead = nil;
locked = nil;
modificationDate = 2006-03-21 15:00:56 -0800;
note = 0x5c53550 x-coredata://336FF957-BFE1-4E2B-9365-C0AFD2398481/Note/p19;
onComplete = "";
paragraphCount = nil;
read = 1;
recur = Mon;
starRating = 2;
tags = "relationship fault: 0x5c537e0 'tags'";
title = "write in lab journal dilligently to better define ";
userInfo = nil;
wordCount = nil;
}),
MIEntryData: 0x5cd0b70 (entity: EntryData; id: 0x5c1cc30 x-coredata://336FF957-BFE1-4E2B-9365-C0AFD2398481/EntryData/p753 ; data: fault)

The code that generates this is:

//check due entries for urgency
predicate = [NSPredicate predicateWithFormat:@"%K != nil", MGdateDueKey];
@try {
[fetchRequest setEntity:[NSEntityDescription entityForName:@"EntryData" inManagedObjectContext:managedObjectContext]];
[fetchRequest setPredicate:predicate];
fetchResults = [managedObjectContext executeFetchRequest:fetchRequest error:&fetchError];
} @catch (NSException *e) {
logErrorWithException(@"failed executeFetchRequest", e);
}
DLog(@"Due Entries: %@", [fetchResults description]);

thanks,
Jeff

Is that faulted entry

Is that faulted entry causing a problem? I think coredata will return faulted entries if you do a fetch and it finds a result that you haven't loaded from the database yet. That way you can do searches that return many entries without coredata needing to load them all from the database at the same time. If you ask the faulted entryData for a value (such as [entryData title] then the fault should fire... that means it will go and fetch the data from the database. Does that seem to work?

I'll check it out and give

I'll check it out and give it a try.
Thanks

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.