Core Data threading again
Core Data threading again
- Subject: Core Data threading again
- From: Aurélien Hugelé <email@hidden>
- Date: Wed, 01 Mar 2006 15:17:53 +0100
There is something i can't understand with core data.
I'm inserting objects in a moc in a thread. There is another moc in
the main thread, and both mocs share the same persistent store
coordinator.
When inserting the objects in the thread, some of its relation ships
are mutated. When the relation ships are mutated, they inform via KVC/
KVO the views.
But since insertion is not done in the main thread, and not on the
main thread moc (and thus not on the observed managed objects), my
views do not refresh.
This is normal. But then what is the point of core data threading ?
how can the views reflect the modifications made to objects that are
done in another thread ? using refreshObject:mergeChange:/
objectWithID: does nothing here, the KVO mechanism can simply not
work in another thread.
are we FORCED to do everything except fetches in the main thread ?
i thought core data was designed with "one database-multiple process
access" in mind. But what happens if a process mutates a relation
ship and save, how am i supposed to reflect this in another process ?
Aurelien. desesperatly looking for help
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden