Author.php 411 Bytes
Newer Older
1
<?php
2 3 4 5 6 7 8 9 10 11
class Author extends Doctrine_Record
{
    public function setUp()
    {
        $this->hasOne('Book', array('local' => 'book_id',
                                    'foreign' => 'id',
                                    'onDelete' => 'CASCADE'));
    }
    public function setTableDefinition()
    {
12 13 14 15
        $this->hasColumn('book_id', 'integer');
        $this->hasColumn('name', 'string',20);
    }
}