2007-09-02 18:24:49 +04:00
|
|
|
<?php
|
2007-09-05 08:42:02 +04:00
|
|
|
class Author extends Doctrine_Record
|
|
|
|
{
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
$this->hasOne('Book', array('local' => 'book_id',
|
|
|
|
'foreign' => 'id',
|
|
|
|
'onDelete' => 'CASCADE'));
|
|
|
|
}
|
|
|
|
public function setTableDefinition()
|
|
|
|
{
|
2007-09-02 18:24:49 +04:00
|
|
|
$this->hasColumn('book_id', 'integer');
|
|
|
|
$this->hasColumn('name', 'string',20);
|
|
|
|
}
|
|
|
|
}
|