私はcore-dataとhava 2埋め込み関係を多用しています。また、私はカレンダーを持っており、選択した日付にすべての病気のすべての薬をダウンロードする必要があります. サブクエリまたはサブクエリを使用してそれを行うにはどうすればよいですか?
Disease ->>Medicine->>Date
スクリーンショットはこちらhttp://savepic.ru/4608231.png
病気に縛られずにすべての薬を検索できますか?
NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease];
[request setEntity:[NSEntityDescription entityForName:@"MyMedicine" inManagedObjectContext:objectContext]];
[request setSortDescriptors:[NSArray initWithObject:[[NSSortDescriptor alloc] initWithKey:@"firstName" ascending:YES]];
[request setPredicate:[NSPredicate predicateWithFormat:@"(data == %@)", currentData]];