I hate to raise natural key/surrogate key again, but maybe there’s an easy 
answer to this question.  With 1.9, we make all of our .equals routines compare 
uuids, which basically says that .equals is an identity test.  I have started 
implementing Comparable on my data access POJOs because in many cases their 
natural order depends on names of concepts or locations referenced by the POJO, 
so I can’t sort on this order when returning a list of POJOs, instead I put the 
returned list through Collections.sort.  However, this means that compare and 
equals are not consistent because the natural order may not be unique, and I 
understand this not to be a desirable situation.  Is implementing Comparable a 
bad approach? Do I need to add ID or some other field to make the natural order 
unique?  Is this not something to worry about?
Saludos, Roger

Reply via email to