• 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: Simple Web forms to create an EO object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple Web forms to create an EO object


  • Subject: Re: Simple Web forms to create an EO object
  • From: Dirk Bajohr <email@hidden>
  • Date: Thu, 5 Aug 2004 01:22:08 +0200

Amorya,

EOs may behave strange if you insert them into an EditingContext after setting some values (especially if you set relationships to other EOs). It's always best to insert them first. Don't set any values in the constructor (before inserting).

But inserting into a context doesn't mean the object is in the database. It will be written only if you call saveChanges, which is the last step.

Cheers,
Dirk


Just been looking through Apple's examples... in one, they create an EO
object as the page is created, but don't insert it into any editing
context! They do the insertion when the Save button is pressed. (At
least, I think that's what happens from reading the code).

I thought this was a bad idea. Someone told me once in no uncertain
terms that you should never have an Enterprise Object that wasn't in
the database.

Any thoughts?

-- Dirk Bajohr iSOLUTION - Individuelle Software fuer moderne Kommunikation

Hauptstr. 50
53757 Sankt Augustin

T +49 2241 921567-0
F +49 2241 921567-89
http://www.isolution.de
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Simple Web forms to create an EO object
      • From: Amorya North <email@hidden>
References: 
 >Simple Web forms to create an EO object (From: Amorya North <email@hidden>)
 >Re: Simple Web forms to create an EO object (From: Nathan Dumar <email@hidden>)

  • Prev by Date: Re: DreamWeaver or GoLive or XXX
  • Next by Date: Re: Simple Web forms to create an EO object
  • Previous by thread: Re: Simple Web forms to create an EO object
  • Next by thread: Re: Simple Web forms to create an EO object
  • Index(es):
    • Date
    • Thread