> From: A mailing list for Enterprise JavaBeans development 
> [mailto:[EMAIL PROTECTED]] On Behalf Of Ashwani Kalra

> Why dont container just compare the public fields of my 
> Primary key class to search for entity. Why it relies on 
> equals and hashcode. ??

Abstraction.  We have no idea what your primary key is.   To us, it's
just an Object.  All we know about it is that it implements hashCode()
and equals(), so that's all we can use.

I think you are mixing up code generated by the persistence manager
(which does know your classes) with the code of the container itself
which has no idea what objects it is dealing with.

-- 
C�dric

==========================================================================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