Sync pull order and to-many relationships
Sync pull order and to-many relationships
- Subject: Sync pull order and to-many relationships
- From: Nick Zitzmann <email@hidden>
- Date: Tue, 21 Jun 2005 16:44:55 -0600
When initiating a sync and pulling changes, it's easily possible to
grab data in a specific order so that "parent" entities are pulled
first, and then entities with a many-to-one relationship pointing to
the parent entity are pulled afterwards. That's not a problem.
But what I'm wondering is how are people dealing with the situation
where the entity has a one-to-many relationship with itself, e.g.
some of the entities in the Calendars schema? My app needs to pull
parent entities first so it can load in the initial data, and loads
related entities second so it can link their data back to the parent
object. But since the changes pulled from the sync session appear to
arrive in no particular order, it's possible that a child change
could be pulled before its parent is pulled.
Since I want to preserve that relationship when converting changes
into my app's data, what is the best way of dealing with a situation
where the sync server sends a child change before its parent while
pulling the truth?
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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