On Apr 2, 2009, at 7:20 AM, Jeffrey Simpson wrote:

When a EO object is saved EOEntityClassDescription.validateObjectForSave will be called on it. This method goes over all the classes properties and
relationships where it calls validateValueForKey.

Is there a way to stop EOEntityClassDescription from validating
relationships?  When it validates a relationship it causes a select to
happen. We noticed this because we have a couple of expensive relationships select wise. It is also kind wasteful to have 5 or 6 selects fire because
you changes a single property.


It needs to ensure that the object is valid. These are probably mandatory relationships and it is verifying there are members. You could try implementing
public Object validateValueForKey(Object value, String key)
to not call super for these keys if you think there is no reason to do so.

A probably better option is to NOT model these relationships, and just fetch / manage them as needed.

Chuck

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to