can someone help me understand the identity property on an entity attribute? Im thinking of the identity property as a table "key" as in a Relational Database, but I'm guessing this is not it. Im using core data and in my entities I have not defined any "Key" columns, and all is working fine. But now that I have added sync services to my app, Im not sure how to use this sync attribute. My app is a task management planner, so I have an entity called task. I have an attribute called "name" , "due date" and other optional attributes. If I have 2 tasks with the same name, I want them both sync, so Im guessing the identity property wont do me good if I set it on the attribute "name". Right now I have not used it, and sync services is working fine... So my question is, in what other scenarios should I use the identity property?
1 Answers
Are you using the standard definition of a task entity from Sync Services? Apple defined one fairly well:
If so, there are three identity properties (summary, record id and calendar).
If you're defining your own entity (not sharing with the system entity) you can make additional attributes identity properties - I'd probably go with "name" and "due date" for sure; you could also add in a "created date" to ensure that you are able to truly create a unique value to compare records using.
In my experience, however, Sync Services has done a good job keeping track of tasks with the identity properties of the system's schema - I can't remember the last time I saw duplicate tasks coming through my own or user's data.
Tell me more about why you might not want to use the system schema but instead roll your own - I can think of pros and cons to each.

- 46
- 2
-
This is for an independent application and it will no sync with ical – the Reverend May 10 '11 at 04:34