Re: Comparing EOs
Re: Comparing EOs
- Subject: Re: Comparing EOs
- From: Paul Lynch <email@hidden>
- Date: Wed, 29 Mar 2006 15:23:36 +0100
On 29 Mar 2006, at 15:04, Miguel Arroz wrote:
Something I could still not figure out from the docs... what is
the standard implementation of the "equals" method in EOs? How does
WebObjects compare objects if I do not implement the equals method?
The standard implementation is to compare references; ie, checks for
identity rather than equality (depending on your definitions). So
the equals check is based on being the same object. However, this is
more elegant than it may seem, as EO handles uniquing of objects,
such that, for any given globalId (which more or less maps to primary
key), the same object will always be returned.
Objects representing the same primary key in different
EOEditingContexts are not identical - which is also very reasonable.
Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden