Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-29-2008, 08:48 AM
Junior Member
 
Join Date: Nov 2007
Posts: 3
Default Cascade delete

Ia have this code:
PHP Code:
class Comandes extends Zend_Db_Table{
    protected 
$_name 'c_comandes';
    protected 
$_dependentTables = array('Lineas');
}
class 
Lineas extends Zend_Db_Table{
    protected 
$_name 'c_lineas';
    protected 
$_referenceMap = array(
        
'Comandes' => array(
            
'columns'        => array("id_c_comandes"),
            
'refTableClass'    => 'Comandes',
            
'refColumns'    => array('id'),
            
'onDelete'      => self::CASCADE 
        
)
    );

and then:

PHP Code:
$C = new Comandes()
$C->delete("id=x"); 
but the dependent "LIneas" are not deleted!
anyone knows what i'm doing grong??

if I get de dependentRowSet of a "Comandes" this work, then there are no problems on the referencemap...

thx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:26 PM.