• 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
locking editing context when removing item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

locking editing context when removing item


  • Subject: locking editing context when removing item
  • From: "Jonathan Fleming" <email@hidden>
  • Date: Mon, 16 Feb 2004 14:39:31 +0000

Just checking really... do I need to put a lock on the ec when removing an item from its own ec? So would this code be wrong or cause problems?:


// the default ec is instatiated somewhere else earlier in the code EOEditingContext ec = session().defaultEditingContext(); ....................

// remove tbAddressAdminUser from queryResults
queryResults.removeObject(tbAddressAdminUser);
// get objects editing context
EOEditingContext ecTb = tbAddressAdminUser.editingContext();
// remove tbAddressAdminUser from object graph
ecTb.deleteObject(tbAddressAdminUser);
// save changes made in editing context to object store


....................
       // the save is done later with the default ec
                       ec.saveChanges();

Advanced Thanks
Jonathan :^)

_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger
_______________________________________________
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.

  • Follow-Ups:
    • Re: locking editing context when removing item
      • From: Jonathan Rochkind <email@hidden>
  • Prev by Date: Re: blocking component from being cached
  • Next by Date: Re: fetching from a number of entity subclasses simultaneously
  • Previous by thread: TransactionManagerConfiguration.xml
  • Next by thread: Re: locking editing context when removing item
  • Index(es):
    • Date
    • Thread