Re: Global ID problem with flattened relationship
Re: Global ID problem with flattened relationship
- Subject: Re: Global ID problem with flattened relationship
- From: Ângelo Andrade Cirino <email@hidden>
- Date: Wed, 21 May 2014 08:27:04 -0300
Hi David,
You are right, that was my first approach, to create the relationships in ContactMechanism.awakeFromInsetion, but then I did not find a way to make the two contexts communicate, D2WContext and EOContext. The problem here is that I am making an effort to keep the relationships managed by ERMODEditRelationshipPage and I couldn't find a way to set up the rules and properties so that a rule will define which sub entity should be created, if Email, Phone or PostalAddress, because ERMODEditRelationshipPage knows nothing about the sub entity.
From Apple's "Enterprise Objects" book comes a hint on how to access a D2WContext in an EOContext, by setting the session object as the default editing context delegate and then accessing the session inside the EO record, but this approach isn't exactly portable and, anyway, it failed because the delegate couldn't be cast to a session:
In session:
defaultEditingContext().setDelegate(this)
and then in the EO:
ERXSession aSession = (ERXSession)editingContext().delegate();
If I find a way to pass from the D2WContext to the EOContext the type of sub entity ERMODEditRelationshipPage must deal with, before ERMODEditRelationshipPage is displayed, my problem is solved.
Angelo
_______________________________________________
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