Re: Peer ECs in updating EO
Re: Peer ECs in updating EO
- Subject: Re: Peer ECs in updating EO
- From: David LeBer <email@hidden>
- Date: Sat, 21 Feb 2009 12:45:47 -0500
On 21-Feb-09, at 10:32 AM, Henrique Gomes wrote:
On Feb 20, 2009, at 11:13 AM, David LeBer wrote:
I wrote a blog post with an intro to working with multiple ECs: < http://davidleber.net/?p=322
>
Two basic rules:
1. You cannot relate EOs in different ECs
2. You cannot move uncommitted EOs between ECs
Thank you for such a clear text.
I'm in the process to change my code to avoid the default EC.
(In my defense the previous projects were mostly read only, very few
writes)
Any way, I now face this question: Let's say I have EO's that, for
example, relate to a country EO.
In my app I had the country list preloaded on the session and used
it as a WOPopUp list binding with the select key bound to my
EO.country.
So to use a peer EC on the edit page, do I have to re-fetch the
country list on the new EC? Is there a better way?
1 Cat. 1 Million ways to skin it. (No cats where harmed during the
creation of the analogy).
Can I leave the "selected" key bound to a var and localInstace() on
the setter?
You could do it that way.
You could write cover methods in your EO - localCountry/
setLocalCountry that do the localInstance thing that you could bind
directly to.
You could copy all of the countries into the local EC on the edit page
using EOUtilities localInstancesOfObjects or similar.
;david
--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
twitter: http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org
_______________________________________________
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