As far as I'm concerned, the usage of the identity field from the
storage mechanism is what I will probably always use.  If my object is
persisted in the db then eventually I will need to use it to reference
itself in the persistence mechanism as well.  So I have to have the ID
from the persistence layer handy within my object if that is the case
otherwise updates/deletes etc would be impossible in most cases.

Since the combination of objectype/id is unique within my system then
I don't think I really need a UUID either, at least not for most
purposes.

However, I can also see why you would want a consistent way to compare
to objects for equality - and at that point a UUID does make sense
simply becuase it does provide a consistent method of comparing two
objects within CF.

For instance I could have a user with ID = 1 (the db id) and a UUID of
x.  Then I could have a organization ID = 1 (the db id) and a UUID of
y.  If I did a comparision of just object ID values then it would
appear they are the same.  However, by comparing UUID it is obvious
they are not the same.

In the end Patrick summed it up in one link to Fowlers page about the
identity field.

I think, sometimes, in our quest to OOify CF we are not seeing the
forest through the trees (or is it the otherway around?)

Bill



On 11/14/05, Patrick McElhaney <[EMAIL PROTECTED]> wrote:
> Hal? We don't need no stinkin' Hal.
>
> If it's good enough for Martin Fowler, it's good enough for me. :)
>
> http://www.martinfowler.com/eaaCatalog/identityField.html
>
> --
> Patrick McElhaney
> 704.560.9117
> http://pmcelhaney.weblogs.us
>
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email to 
> [email protected] with the words 'unsubscribe cfcdev' as the subject of the 
> email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
> (www.cfxhosting.com).
>
> An archive of the CFCDev list is available at 
> www.mail-archive.com/[email protected]
>
>
>


--
[EMAIL PROTECTED]
http://blog.rawlinson.us

If you want Gmail - just ask.


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to