> From: Dave Wolf

> Its an interesting question whether the pk is semantically immutable.  I
> dont see the spec every lay this out as a requirement.  Secondly, if we're
> persisting to an RDBMS which 90% of people are, the RDBMS does actually
> allow updates on the PK field.  So this PK mutability can occur actually
> outside the EJB and bring about the same issue.  Since neither EJB nor the
> RDBMS enforce the relational models view that nothing changes the PK value
> (a natural key) then how can we assume it is immutable?

Because it doesn't make sense otherwise? :-)

For example, Hashtable doesn't specify that equals()/hashCode() need to
return the same value after the object has been stored in the table, but the
behavior is unpredictable if they don't.

Not hard to extend this consideration to PK's.

Be nice to the container and the container will be nice to you :-)

--
Cedric

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to