MeioUpload icon indicating copy to clipboard operation
MeioUpload copied to clipboard

parent model hasMany child model which are MeioUpload afterdelete, images remain

Open simkimsia opened this issue 15 years ago • 0 comments

Hi,

i have a parent model that is called Product

i have a child model that is called ProductImages.

as you can imagine, Product hasMany ProductImages

once i delete Product, the ProductImages are gone as well because i have set the exclusive and dependency as true

var $hasMany = array(
    'ProductImage' => array(
        'className' => 'ProductImage',
        'foreignKey' => 'product_id',
        'dependent' => true,
        'conditions' => '',
        'fields' => '',
        'order' => '',
        'limit' => '',
        'offset' => '',
        'exclusive' => true,
        'finderQuery' => '',
        'counterQuery' => ''
    ),

);

i have updated to the latest master copy of meioupload.

however, even though the data is removed, the image and the thumbnails are stilll there. i noted that MeioUpload already has some kind of file removal function in its afterDelete. so what is preventing this from working?

simkimsia avatar Jun 01 '10 08:06 simkimsia