1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/models/CascadeDeleteRelatedTest.php

21 lines
708 B
PHP
Raw Normal View History

<?php
class CascadeDeleteRelatedTest extends Doctrine_Record
{
public function setTableDefinition()
{
$this->hasColumn('name', 'string');
$this->hasColumn('cscd_id', 'integer');
}
public function setUp()
{
$this->hasOne('CascadeDeleteTest', array('local' => 'cscd_id',
'foreign' => 'id',
'onDelete' => 'CASCADE',
'onUpdate' => 'SET NULL'));
$this->hasMany('CascadeDeleteRelatedTest2 as Related',
array('local' => 'id',
'foreign' => 'cscd_id'));
}
}