Hi,
ich habe ein Problem mit dem Context. Ich möchte in einer Child-Klasse mit dem Context arbeiten.
Ich mache dieses ganze so in der Child-Klasse.
Alles anzeigen
Leider findet übergibt er wohl den Inhalt vom Parent- nicht an den Child-Context.
Ich bekomme nämlich folgenden Fehler:
"could not locate an NSManagedObjectModel for entity...."
Was mache ich falsch ?
Danke
ich habe ein Problem mit dem Context. Ich möchte in einer Child-Klasse mit dem Context arbeiten.
Ich mache dieses ganze so in der Child-Klasse.
Quellcode
- NSManagedObjectContext *child = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
- NSManagedObjectContext *parent = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType];
- [child setParentContext:parent];
- //hier mache ich was mit dem child Context
- NSError *childError = nil;
- [child save:&childError];
- [parent performBlock:^{
- NSError *parentError = nil;
- [parent save:&parentError];
- }];
Leider findet übergibt er wohl den Inhalt vom Parent- nicht an den Child-Context.
Ich bekomme nämlich folgenden Fehler:
"could not locate an NSManagedObjectModel for entity...."
Was mache ich falsch ?
Danke