• 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: Can't modify EO objects! ARGH! =(
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't modify EO objects! ARGH! =(


  • Subject: Re: Can't modify EO objects! ARGH! =(
  • From: Art Isbell <email@hidden>
  • Date: Thu, 17 Jul 2003 23:24:25 -1000

On Thursday, July 17, 2003, at 10:23  PM, Ben Ketteridge wrote:

Chuck Hill wrote:
Art Isbell wrote:
On Thursday, July 17, 2003, at 11:59 AM, Albert Jagnow wrote:
I am confused by the pattern you list below. I have had more problems
doing insert before populate.

Us too. We have found that a useful compromise is:
1) create
2) populate non-relationship columns
3) insert
4) populate relationships (mostly by addObjectToBothSidesOfRelationshipWithKey)
5) save

Why is any compromise needed? What's the harm in inserting an object before any changes are made?


And if the user just hits the 'X' to kill the window without making a 'forget it' request to the application, you're left with objects hanging around in the child EC.

So? If the child EC is referenced only by an ivar in the page that was closed, the user won't be able to access it again except maybe by backtracking. When the page leaves the cache, the child EC will be garbage-collected along with the changes to its objects. These changes won't affect the parent EC if they haven't been saved.


In fact this can be a problem if you use the defaultEditingContext and insert before you're ready to save!

True. That's one reason to use a child EC for these changes.

Aloha,
Art
_______________________________________________
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.

References: 
 >Re: Can't modify EO objects! ARGH! =( (From: Ben Ketteridge <email@hidden>)

  • Prev by Date: Re: Can't modify EO objects! ARGH! =(
  • Next by Date: Re: EO Object Lifespan / Editing Context (Goodbye Bill)
  • Previous by thread: Re: Can't modify EO objects! ARGH! =(
  • Next by thread: Re: Can't modify EO objects! ARGH! =(
  • Index(es):
    • Date
    • Thread