Hello,

If you are using a innodb table, the delete method from the Article
never call Media::delete method. The deletion is done by mysql/innodb
engine.

what you should do is to overwrite the delete from the article to get
and store image location, then delete the article (the images rows
will be delete) then you have to traverse your files array to delete
thoses files.

Thomas

On Mon, May 12, 2008 at 10:49 AM, nico_bl1nd <[EMAIL PROTECTED]> wrote:
>
> This is quite automatic.
> I call the Article.delete method, then everything is done by "magic",
> thanks to the schema.yml onDelete:cascade parameter in the Media
> definition.
> I'm not sure to be clear.
>
> On 12 mai, 10:37, cleve <[EMAIL PROTECTED]> wrote:
>> Are you still calling the parent delete function after removing the
>> files?
>>
>> On May 12, 8:26 am, nico_bl1nd <[EMAIL PROTECTED]> wrote:
>>
>> > Hi everyone,
>>
>> > I'm working on two related tables : article/media.
>> > "onDelete: cascade" work like a charm. But I would the media files to
>> > be deleted to.
>> > Where should this part of the code be integrated ? I though it would
>> > in the Media.php/delete function, but it doesn't work.
>> > Any idea ?
>>
>> > thanks a lot.
>> > Nicolas
> >
>



-- 
Thomas Rabaix

Internet Consultant

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to