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

2010-07-27 Thread David Avendasora
On Jul 26, 2010, at 1:28 PM, Chuck Hill wrote: >> I also heard that if an entity has multiple levels of hierarchy then delete >> cascade won't work after second level. > > I have not heard that. I have deleted several levels with no problems. Whenever I ran into problems with this, it was _al

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

2010-07-26 Thread Chuck Hill
On Jul 24, 2010, at 1:51 AM, Farrukh Ijaz wrote: > Thanks Chuck and Ramsey for quick response. > > I don't know what was the case. Whether the editingContexts where overlapping > or not. Before I was using: > > a.delete(); > editingContext().saveChanges(); // This is the same editing context w

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

2010-07-24 Thread Farrukh Ijaz
Thanks Chuck and Ramsey for quick response. I don't know what was the case. Whether the editingContexts where overlapping or not. Before I was using: a.delete(); editingContext().saveChanges(); // This is the same editing context which was used to load "a". The above was not triggering willDel

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

2010-07-23 Thread Ramsey Gurley
On Jul 23, 2010, at 3:56 PM, Chuck Hill wrote: willDelete() won't be called on the rest until saveChanges() On Jul 23, 2010, at 12:51 PM, Farrukh Ijaz wrote: Hi, I have a model where an entity A has a recursive relationship as parent "toParentOfTypeA()" and children "toChildrenOfTypeA()"

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

2010-07-23 Thread Chuck Hill
willDelete() won't be called on the rest until saveChanges() On Jul 23, 2010, at 12:51 PM, Farrukh Ijaz wrote: > 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.

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

2010-07-23 Thread Farrukh Ijaz
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