• 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
How do I know when an EOEnterpriseObject is removed from an Editi ng Context?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I know when an EOEnterpriseObject is removed from an Editi ng Context?


  • Subject: How do I know when an EOEnterpriseObject is removed from an Editi ng Context?
  • From: "MacMullin, Jake (DCS)" <email@hidden>
  • Date: Thu, 9 Jan 2003 10:52:41 +1030

Hi,

I need to do some database manipulation with raw SQL when my objects are
created - so I have overridden awakeFromInsertion to write some stuff to the
DB when my objects are inserted into an editing context. I also need to do
some cleaning up if the object is deleted - so I have overridden
validateForDelete to use raw SQL to delete the stuff from the database. This
works beautifully. Whenever I create an object it writes the stuff I want to
the DB and when it is deleted it cleans up after itself.

However, I have stumbled across a problem. What do I do if the object is
created and inserted in to the editing context, but then the changes are
discarded, like if the 'Cancel' button is pressed in a Direct2Web app or by
revert() being called on the editing context. It seems like the
validateForDelete method isn't called in this case. So how do I know when
one of my custom EOEnterpriseObjects is discarded in this manner?

Regards,

Jake MacMullin


This e-mail is personal. It is not authorised by, nor sent on behalf of, the
Government of South Australia.
_______________________________________________
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: How do I know when an EOEnterpriseObject is removed from an Editi ng Context?
      • From: Jonathan Rochkind <email@hidden>
  • Prev by Date: Re: Strange problems when saving in WO5.2
  • Next by Date: Re: How do I know when an EOEnterpriseObject is removed from an Editi ng Context?
  • Previous by thread: Re: Fetching Unqualified Data Vs Qaulified Data
  • Next by thread: Re: How do I know when an EOEnterpriseObject is removed from an Editi ng Context?
  • Index(es):
    • Date
    • Thread