• 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
willDelete() is not getting fired for children in a tree structured entity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

willDelete() is not getting fired for children in a tree structured entity


  • Subject: willDelete() is not getting fired for children in a tree structured entity
  • From: Farrukh Ijaz <email@hidden>
  • Date: Fri, 23 Jul 2010 22:51:18 +0300

Hi,

I have a model where an entity A has a recursive relationship as parent "toParentOfTypeA()" and children "toChildrenOfTypeA()". Consider it as a tree structured entity.

In the model have setup the entity to delete cascade.

In the entity I have overriden the method willDelete(). Now when I delete the parent, it fires the willDelete() of it but does not fire willDelete() of it's children. When I checked in the willDelete() I found the toChildren() relationship is empty but the children are there and I access it in the component when I generate tree. Below is the source code.

Follwing method is overridden inside entity A.

public void willDelete() {
    ERXUtilities.deleteObjects(editingContext(), toChildrenOfTypeA());
}

// below code is somewhere else.
A a = // object retrieved from the db.
a.delete();

Any Idea? If needed, I can send the source code too.

Farrukh

Sent from my iPad _______________________________________________
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: willDelete() is not getting fired for children in a tree structured entity
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Dumb ERAttachmentFlexibleUpload question
  • Next by Date: Re: Dumb ERAttachmentFlexibleUpload question
  • Previous by thread: Re: Dumb ERAttachmentFlexibleUpload question
  • Next by thread: Re: willDelete() is not getting fired for children in a tree structured entity
  • Index(es):
    • Date
    • Thread