• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Stopping EOEntityClassDescription.validateObjectForSave from tripping relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stopping EOEntityClassDescription.validateObjectForSave from tripping relationships


  • Subject: Re: Stopping EOEntityClassDescription.validateObjectForSave from tripping relationships
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 2 Apr 2009 11:05:21 -0700


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@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Stopping EOEntityClassDescription.validateObjectForSave from tripping relationships
      • From: Jeffrey Simpson <email@hidden>
References: 
 >Stopping EOEntityClassDescription.validateObjectForSave from tripping relationships (From: Jeffrey Simpson <email@hidden>)

  • Prev by Date: Re: WO Apache Adaptor not seeing my apps
  • Next by Date: Re: WO Apache Adaptor not seeing my apps
  • Previous by thread: Stopping EOEntityClassDescription.validateObjectForSave from tripping relationships
  • Next by thread: Re: Stopping EOEntityClassDescription.validateObjectForSave from tripping relationships
  • Index(es):
    • Date
    • Thread