• 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: Nested Editing Contexts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Nested Editing Contexts


  • Subject: Re: Nested Editing Contexts
  • From: Jean Pierre Malrieu <email@hidden>
  • Date: Thu, 31 May 2007 08:34:47 +0200


A) Clearly document the issue from the outset of the product. Without an active third party community that enlightened these issues, I feel sure I would have never been aware of them, and probably would have switched development platforms in frustration by now.


Cough. Cough.


http://developer.apple.com/documentation/WebObjects/ Enterprise_Objects/EnterpriseObjects/chapter_3_section_13.html#// apple_ref/doc/uid/TP30001011-DontLinkChapterID_8-TPXREF146

And I quote, "Note that immediately after the enterprise object is
created, it is inserted into an editing context. As a cardinal rule,
all enterprise objects reside in an editing context. This is
necessary in order for enterprise objects to send and receive the
notifications necessary for change tracking and other mechanisms
within Enterprise Objects. So, for every enterprise object you
create, you must immediately insert it into an editing context."


http://developer.apple.com/documentation/WebObjects/ Enterprise_Objects/BusinessLogic/chapter_4_section_3.html#//apple_ref/ doc/uid/TP30001011-DontLinkChapterID_3-TPXREF140

"You may wonder why it’s not recommended to initialize an enterprise
object’s values in an object’s constructor. An enterprise object’s
constructor represents the earliest state in the life of a particular
object. The state of an enterprise object at the point of
construction is not complete; the object is not fully initialized. It
may not yet have been inserted into an editing context and it might
not even have been assigned a global ID. You don’t ever want to
manipulate an enterprise object that isn’t in an editing context or
that doesn’t have a global ID."

This as not always been so clear. In Apple's WO formation support material (around 2002), they did talk about a method of dealing with object editing and backtracking: they call it "deferred insertion". Basically, they say you can set attributes (not relationships) on a non inserted EO, and then insert it if the user commits his changes.


<rant>
And given the amount of effort Apple is putting in WO, I wouldn't be surprized if this is still the case in the current training course support material... But I may be wrong. Did they even update the training documentation to use xCode, and not ProjectBuilder? For a while they did not. And they charged a lot of money for an outdated documentation. But now those days are gone, and Apple has cash enough to devote more efforts to WO...
</rant>


JPM

_______________________________________________
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


  • Prev by Date: Re: D2W and Direct Actions
  • Next by Date: Re: Nested Editing Contexts
  • Previous by thread: Re: Nested Editing Contexts
  • Next by thread: AW: InsertObject
  • Index(es):
    • Date
    • Thread