if (self->filenames != nil)
return [self->filenames isNotNull] ? self->filenames : nil;
-
+
uids = [self fetchUIDsMatchingQualifier:nil sortOrdering:@"DATE"];
if ([uids isKindOfClass:[NSException class]])
return nil;
- (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag {
id obj;
- /* first check attributes directly bound to the application */
- if ((obj = [super lookupName:_key inContext:_ctx acquire:NO]) != nil)
+ if ([self isMessageKey:_key inContext:_ctx])
+ /*
+ We assume here that _key is a number and methods are not and this is
+ moved above the super lookup since the super checks the
+ -toOneRelationshipKeys which in turn loads the message ids.
+ */
+ return [self lookupImap4Message:_key inContext:_ctx];
+
+ /* check attributes directly bound to the app */
+ if ((obj = [super lookupName:_key inContext:_ctx acquire:NO]))
return obj;
- obj = [self isMessageKey:_key inContext:_ctx]
- ? [self lookupImap4Message:_key inContext:_ctx]
- : [self lookupImap4Folder:_key inContext:_ctx];
+ obj = [self lookupImap4Folder:_key inContext:_ctx];
if (obj != nil)
return obj;