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

Re: InsertObject


  • Subject: Re: InsertObject
  • From: Alan Ward <email@hidden>
  • Date: Wed, 30 May 2007 05:36:10 -0600


Don't fight it (you'll lose). Create an editingContext for each user, put the objects into that editingContext
as soon as you create them, revert the editingContext if you decide not to save their changes.


Alan

On May 30, 2007, at 5:20 AM, Frederic JECKER wrote:

Hi,

In my case, I can't insert objects in the editing context at their creation but only at the end of the transaction because the user
can cancel his action at any time.
Doing as decribed works (I do it myself) but if I do so, I will need to call at editingContext.revert()
to prevent unwanted changes to be saved in the database by another part of my app using the same context.


To sum up, I'm just looking for a method like EOEditingContext.awakeFromInsert except that it would be called before inserting objects instead of after.
This way I could insert relationship members in the editingContext for each EOCustomObject in their own classes and avoid huge code blocks of insert
in my main controller


Regards

FJ
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.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: InsertObject
      • From: Ken Anderson <email@hidden>
References: 
 >InsertObject (From: Frederic JECKER <email@hidden>)
 >Re: InsertObject (From: Ken Anderson <email@hidden>)
 >Re: InsertObject (From: Frederic JECKER <email@hidden>)

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