db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff hendrey <geoff_hend...@yahoo.com>
Subject Question on TCK11
Date Sat, 21 May 2005 19:53:35 GMT
Department.hashCode method is using a persistent field
to compute the value of the hashcode, in TCK11. Note
that in the Sun version of the TCK, which JDOMax
passes, hashCode is NOT overidden for Department. 

I think it is wrong to override hashCode and equals
for any class using datastore identity. This was the
subject of 35 or so emails on the experts group, and
this was the position espoused by Craig.

Craig laid down the law:
"If you don't have a set of fields that uniquely form
an application identity, then you should not implement
equals. You *should* delegate to Object.equals"

Please let me know if an implementation is expected to
handle cases when the user overides equals and
hashCode for datastore identity? Certainly, JDOMax
does NOT, and is failing a good bit of the Apache
TCK11 because of it!


Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 

View raw message