Re: Can't modify EO objects! ARGH! =(
Re: Can't modify EO objects! ARGH! =(
- Subject: Re: Can't modify EO objects! ARGH! =(
- From: Marek Wawrzyczny <email@hidden>
- Date: Tue, 22 Jul 2003 11:52:12 +1000
On Tuesday, Jul 22, 2003, at 10:55 Australia/Sydney, Art Isbell wrote:
On Monday, July 21, 2003, at 02:17 PM, Jonathan Rochkind wrote:
Why not carry this to its logical conclusion and use an editing
context for each page as Cocoa does (did?) for each nib? There's
nothing special about the session's default editing context except
that WOSession manages its locks when concurrent request handling is
enabled. But as you've pointed out, who wants to be creating local
instances of all the objects you need in each editing context? It's
nice to use a single editing context when possible.
Agreed, however, our system is an online enrollment system. There is
only one point in the application where we want to create "real"
records - at the receipt of a payment confirmation. This means that
until that point is reached, most of the EOs exist solely in the EC.
Using nested ECs, you end up doing something to your single session
default EC, and if you do something that somehow puts the EC in a
corrupt state, that corrupt state is left there for all subsequent
uses, and will keep throwing exceptions. I'm currently dealing with
this.
In that case, maybe you could just replace WOSession's default
editing context (setDefaultEditingContext()).
Just as long as you set the session's default editing context once
(setDefaultEditingContext() will not allow you to reset it afterwards).
Marek Wawrzyczny
software engineer
-------------------------->
ish group pty ltd
7 Darghan St Glebe 2037 Australia
phone +61 2 9660 1400 fax +61 2 9660 7400
http www.ish.com.au | email email@hidden
_______________________________________________
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.