• 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: Mike Schrag <email@hidden>
  • Date: Wed, 30 May 2007 18:38:15 -0400

willChange calls willRead (i just happened to check this) ... I THINK willReadRelationship is probably the same? Not sure about that offhand.

On May 30, 2007, at 6:32 PM, Lachlan Deck wrote:

On 31/05/2007, at 8:15 AM, Chuck Hill wrote:

On May 30, 2007, at 12:57 PM, Steven Mark McCraw wrote:

B) Programmatically constrain programmers to follow those rules. Since changing the state of an object is so catastrophic if the object is not in the pool that enables it to be tracked, why not throw an exception when that condition is encountered, rather than just letting the programmer proceed and wander into the terrible limbo of a hosed database context and all sorts of strange, untraceable and difficult to reproduce behavior?

I have often wondered that. Now you have gone and provoked me. I will file a bug report. You _can_ do this yourself by adding this to your base EO class:


public void willRead() {
if (editingContext() == null) {
throw new IllegalStateException("Access of instance of " + entityName() + " that has not been inserted into an EOEditingContext or whose EOEditingContext has been disposed");
}
super.willRead();
}

perhaps willChange and willReadRelationship are also worth the same treatment(?)


with regards,
--

Lachlan Deck



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mdimension.com


This email sent to email@hidden


_______________________________________________
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


  • Follow-Ups:
    • Re: Nested Editing Contexts
      • From: Mike Schrag <email@hidden>
References: 
 >Nested Editing Contexts (From: "Ted Archibald" <email@hidden>)
 >Re: Nested Editing Contexts (From: Steven Mark McCraw <email@hidden>)
 >Re: Nested Editing Contexts (From: Mike Schrag <email@hidden>)
 >Re: Nested Editing Contexts (From: Steven Mark McCraw <email@hidden>)
 >Re: Nested Editing Contexts (From: Chuck Hill <email@hidden>)
 >Re: Nested Editing Contexts (From: Lachlan Deck <email@hidden>)

  • Prev by Date: Re: Nested Editing Contexts
  • Next by Date: Re: Nested Editing Contexts
  • Previous by thread: Re: Nested Editing Contexts
  • Next by thread: Re: Nested Editing Contexts
  • Index(es):
    • Date
    • Thread