• 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: Edit before insert into EO (was Re: new/update form patterns)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >new/update form patterns (From: Mike Schrag <email@hidden>)
 >Re: new/update form patterns (From: Ondra Cada <email@hidden>)
 >Re: new/update form patterns (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: Newbie: WOComponent doesn't appear
  • Next by Date: WebObjects web service server stops responding at ~250 calls. Pourquoi???
  • Previous by thread: Re: new/update form patterns
  • Next by thread: Re: new/update form patterns
  • Index(es):
    • Date
    • Thread