Thread:
 Using properties of an object for equals and hash ... 
 andrewGoedhart   26 Jan 2005, 16:45 
 Re: Using properties of an object for equals an... 
 Ras_Nas   05 Feb 2005, 02:50 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: Ras_Nas (05 Feb 2005, 02:50) Replies: 0, Views: 37119
Subject: Re: Using properties of an object for equals and hash c...
On 26 Jan 2005 16:45, andrewGoedhart wrote:

>The reccomendation of using the properties of an object rather then
>the object identity and or synthetic primary key is just as broken as
>the problem we are trying to highlight and solve.

The above statement is broken because using "the object identity and 
or synthetic primary key" and "the problem" are equivalent.

Everything you wrote takes us back to square one (you pointed out very 
well the problem with your alternate scheme) because you missed the 
phrase 'immutable properties' that the original author used.

>The whole point in generating synthetic primary keys in the first
>place is to avoid having a primary key which is dependant on an
>object property and which therefore may change during the life
>time of the object.

Is it so? From a 'relational' world perspective, is immutability a
requirement for a primary key?
What's "primary keys" got to do with "object property" when there are
no objects in the relational world?
If there were, would we need Hibernate?

Rico.
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]