• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Globally unique IDs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Globally unique IDs


  • Subject: Re: Globally unique IDs
  • From: Pierre Frisch <email@hidden>
  • Date: Sat, 7 Feb 2004 17:11:26 -0800

On Feb 7, 2004, at 14:46, Ben Trumbull wrote:

> At 13:45 -0500 2/6/04, Colin O'Brien wrote:
>> It seems the automatic private key mechanism in WO only provides
>> unique keys
>> within a single database.
>
> Yes and no.  EOF can only support an Entity mapping to a single
> database at a time.  So the Table+rowPK is unique within a scope
> beyond a single database (all apps using that Entity's model; glossing
> over entity inheritance).
>
> It's not uncommon practice to manipulate the models, connection
> dictionaries, model groups, and EOF stacks (EOObjectStoreCoordinators)
> at runtime.  So, indeed, it's not difficult to create a situation
> where the PKs are no longer unique with multiple databases even within
> one app.
>
Could you elaborate on the uniqueness. If I am not mistaken the 24
bytes is build as follow:

             _hostAddress = "";				// 12 Char
             _processIdentifier = "00000000";		// 8  Char
             _counter = 0;				// 4 Char
             _timestamp = (new Date()).getTime();	// 16 Char
             _random = new Random(_timestamp);		// 8 Char

The timestamp is defined as milliseconds I do not see how you could get
two objects with the same ID.

Pierre

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Globally unique IDs
      • From: Alexander Spohr <email@hidden>
References: 
 >Globally unique IDs (From: "Colin O'Brien" <email@hidden>)
 >Re: Globally unique IDs (From: Ben Trumbull <email@hidden>)

  • Prev by Date: Re: Globally unique IDs
  • Next by Date: Re: Globally unique IDs
  • Previous by thread: Re: Globally unique IDs
  • Next by thread: Re: Globally unique IDs
  • Index(es):
    • Date
    • Thread