| 36 | | /* |
| 37 | | NSFetchRequest *fetch = [[[NSFetchRequest alloc] init] autorelease]; |
| 38 | | [fetch setEntity:[NSEntityDescription entityForName:@"Bookmark" inManagedObjectContext:context_]]; |
| 39 | | NSPredicate *pred = [NSPredicate predicateWithFormat:@"tags != 'aa'", beforeObject]; |
| 40 | | [fetch setPredicate:pred]; |
| 41 | | |
| 42 | | NSError *err; |
| 43 | | NSArray *bookmarks = [context_ executeFetchRequest:fetch error:&err]; |
| 44 | | |
| 45 | | if (nil == bookmarks) { |
| 46 | | NSLog([NSString stringWithFormat:@"Fetch error in background thread: %@", err]); |
| 47 | | return beforeObject; |
| 48 | | } |
| 49 | | NSLog(@"%d", [bookmarks count]); |
| 50 | | // Fault the words relationship on the letter |
| 51 | | // The precise contents of the relationship are a separate fault-firing (fetch) from the actual words data |
| 52 | | //return (id)[[beforeObject valueForKey:@"bookmarks"] count]; |
| 53 | | return [NSNumber numberWithInt: [bookmarks count]]; |
| 54 | | */ |
| 55 | | //NSSet *bookmarks = [beforeObject valueForKeyPath:@"bookmarks.tags"]; |
| 56 | | //return [NSNumber numberWithInt: [bookmarks count]]; |
| 57 | | id a = [beforeObject valueForKeyPath:@"title"]; |
| 58 | | NSLog(@"%@", a); |
| 59 | | return [NSNumber numberWithInt: [a count]]; |
| | 30 | return [NSNumber numberWithInt:[[beforeObject valueForKeyPath:@"title"] count]]; |