Seeking clarification on NSManagedObjectID

  • After reviewing the Core Data documentation the following is not clear
    to me: If a managed object is deleted, is there a chance that its
    object ID will be subsequently reused?

    Thanks,
    dave
  • > After reviewing the Core Data documentation the following is not clear
    > to me: If a managed object is deleted, is there a chance that its
    > object ID will be subsequently reused?

    http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/index.ht
    ml#//apple_ref/doc/uid/TP40001075


    "An NSManagedObjectID object is a universal identifier for a managed
    object, and provides basis for uniquing in the Core Data Framework. A
    managed object ID uniquely identifies the same managed object both
    between managed object contexts in a single application, and in
    multiple applications (as in distributed systems). Like the primary
    key in the database, an identifier contains the information needed to
    exactly describe an object in a persistent store ..."

      With wording like "the basis for uniquing", and "like the primary
    key in the database", I take this to mean an ID is never reused.
    Further, I believe they use UUIDs so it's unlikely you'd ever be
    *able* to get the same ID generated for a managed object.

    --
    I.S.
  • While I tend to agree with your interpretation, the three sections of
    the documentation I found which discuss uniquing do not explicitly
    answer my question.  I was hoping someone with implementation
    knowledge could provide a definitive answer so that I'm not making an
    incorrect assumption.

    Thanks,
    dave

    On 6-Nov-07, at 8:50 AM, I. Savant wrote:

    >> After reviewing the Core Data documentation the following is not
    >> clear
    >> to me: If a managed object is deleted, is there a chance that its
    >> object ID will be subsequently reused?
    >
    > http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/index.ht
    ml#/

    > /apple_ref/doc/uid/TP40001075
    >
    > "An NSManagedObjectID object is a universal identifier for a managed
    > object, and provides basis for uniquing in the Core Data Framework. A
    > managed object ID uniquely identifies the same managed object both
    > between managed object contexts in a single application, and in
    > multiple applications (as in distributed systems). Like the primary
    > key in the database, an identifier contains the information needed to
    > exactly describe an object in a persistent store ..."
    >
    > With wording like "the basis for uniquing", and "like the primary
    > key in the database", I take this to mean an ID is never reused.
    > Further, I believe they use UUIDs so it's unlikely you'd ever be
    > *able* to get the same ID generated for a managed object.
    >
    > --
    > I.S.
    >
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today