Re: EOF transient properties
Re: EOF transient properties
- Subject: Re: EOF transient properties
- From: "Paulo F. Andrade" <email@hidden>
- Date: Mon, 27 Jul 2009 10:16:55 +0100
Hello,
Thank you all for the suggestions.
On 2009/07/27, at 00:07, Chuck Hill wrote:
Hi Paulo,
On Jul 26, 2009, at 7:00 AM, Paulo F. Andrade wrote:
Does EOF have any type of transient properties similar to what Core
Data has?
If not imagine this simple scenario.
1 - You have an eo with a couple of ivars (ie, they are nor EO
properties thus not saved to disk, EOF has no clue about them).
2 - You try to pass this EO to aother EC via
EOUtilities.localInstanceOfObject
3 - What happens is that the new EO does not have the ivars from
the initial EO.
Can one, at some point during the localInstanceOfObject force these
ivars to be copied to the new EO?
Which localInstanceOfObject? The only implemented in EOUtilities
just grabs the EOGlobalID from the EO and uses it to create a fault
in the second EC. Some veogen templates create a method like:
public PriorityList localInstance(EOEditingContext
editingContext) {
return
(PriorityList)EOUtilities.localInstanceOfObject(editingContext, this);
}
You could override that and copy the transient properties. Or you
could get fancy and be generic and use the RTTI to find and copy any
ivars.
Yes, that was also my solution. I override the
localInstanceOf<Entitiy> method to do what I want. This way I can keep
the logic of copying those ivars inside the EO, which is good enough.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Learn WO at WOWODC'09 East in Montréal this August!
http://www.wocommunity.org/wowodc09/east
http://arstechnica.com/apple/news/2009/07/webobjects-sliced-from-106but-prognosis-of-death-premature.ars
_______________________________________________
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