Re: Edit before insert into EO (was Re: new/update form patterns)
Re: Edit before insert into EO (was Re: new/update form patterns)
- Subject: Re: Edit before insert into EO (was Re: new/update form patterns)
- From: Sacha Mallais <email@hidden>
- Date: Thu, 26 May 2005 13:58:31 -0700
On May 26, 2005, at 1:24 PM, Mike Schrag wrote:
But most often, I am eating my cake and still having it by
creating the EO first, but saving it into EC only when properly
set up. That way, it can be wired up directly, and still, if the
user abandons it, it just vanishes when the GC decides so :)
Doesn't this violate one of the ten commandments of EOF? Isn't one
of them that you're not supposed to update an EO prior to inserting
it? I've not been able to find good docs as to WHEN that actually
causes problems though (one of our internal apps does this, too,
and it seems to work fine, but I gather it will burn us under
certain circumstances).
The reason to only edit after insertion is because EOF needs to know
that the object has changed. You would see problems if you create,
edit, inserted and then tried to save without any further edits.
There might also be extra problems with setting relationships before
inserting, but I'm not sure about that.
In any case, many people seem to have no problems with editing before
inserting (and, in fact, D2W [de-]generates code that does just this
-- and it works), but, for my part, I was bitten bad by this back in
the day and will never, ever do it again. :-)
sacha
_______________________________________________
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