• 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: clearing a toMany relationship fault
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clearing a toMany relationship fault


  • Subject: Re: clearing a toMany relationship fault
  • From: Lachlan Deck <email@hidden>
  • Date: Fri, 5 Sep 2008 11:39:41 +1000

On 05/09/2008, at 3:47 AM, Mike Schrag wrote:

Shallow and Deep, with an optional depth setting?

Shallow is the current EO and its toMany, then stops.

Deep continues on through the graph to a depth of 'depth' ?

Shallow is a wrapper method of Deep with 'depth = 0' ?

This could be a very expensive operation if mis-used, but is badly needed.
Ultimately I think this has to be rules-based ... This same problem happens when serializing object graphs over JSON services ... Which to-many's do you include? Which do you live as faults? I've looked at it a million ways and I think you can only ever do it right with a d2wish rules definition that lets you pick the context you're in to determine which keypaths end up in vs out and faulted vs not.

Okay - creating these rules is quite simple. You have two properties lists:

er.extensions.ERXGenericRecord.relationshipCacheWhiteList = {\
	_ALL = "any,relationship,named,from,any,entity";\
	_MISFITS = "Entity,Names,That,Don't,apply,to,_ALL";\
	EntityName = "comma,separated,keypaths,that,can,be,refreshed";\
}
er.extensions.ERXGenericRecord.relationshipCacheBlackList = {\
	_ALL = "any,relationship,named,from,any,entity";\
	_MISFITS = "Entity,Names,That,Don't,apply,to,_ALL";\
	EntityName = "comma,separated,keypaths,that,cannot,be,refreshed";\
}

er.extensions.ERXGenericRecord.reverseToManyRelationshipsRefresh=true

How's that?

with regards,
--

Lachlan Deck

_______________________________________________
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


References: 
 >clearing a toMany relationship fault (From: Lachlan Deck <email@hidden>)
 >Re: clearing a toMany relationship fault (From: Lachlan Deck <email@hidden>)
 >Re: clearing a toMany relationship fault (From: Lachlan Deck <email@hidden>)
 >Re: clearing a toMany relationship fault (From: Chuck Hill <email@hidden>)
 >Re: clearing a toMany relationship fault (From: Michael DeMan <email@hidden>)
 >Re: clearing a toMany relationship fault (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: Do DA's add a page to the app's cache ?
  • Next by Date: Re: Inherited Relationships using Different Destinations
  • Previous by thread: Re: clearing a toMany relationship fault
  • Next by thread: Re: clearing a toMany relationship fault
  • Index(es):
    • Date
    • Thread