Hi All,

I'm rapidly nearing the completion of my first serious cake app (thanks 
to everyone for all the help!).  I am having a problem with deletes.

I have several models (artists, artworks, texts, etc).  The 
relationsthips are:

        artist hasMany artworks, hasMany texts
        artwork belongsTo Artist, HABTM texts
        text belongsTo Artist, HABTM artwork

The hasMany relationships have dependent set TRUE.

When I delete an artist, the artworks entries are deleted, but NOT the 
texts.  That's problem #1.

Problem #2 is that artworks and texts have files associated (their 
jpegs), which I need to clean up when the artworks and/or texts are
deleted.  I have beforeDelete on the artworks and texts models which
clean up the appropriate files, and those appear to be working IF
I delete a specific artwork or a specific text.  BUT, the beforeDelete
functions are NOT being called by the "cascade" when an artist is
deleted (of course, texts aren't being deleted AT ALL in that case).

So, suggestions on how to best handle this?  Am I doing something
wrong?  I would have thought that the artwork beforeDelete would be
called whenever an artwork is being deleted.  and how come Texts are
not being deleted?

THANKS!
-Scott

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to