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

16 lines
411 B
PHP
Raw Normal View History

<?php
class Author extends Doctrine_Record
{
public function setUp()
{
$this->hasOne('Book', array('local' => 'book_id',
'foreign' => 'id',
'onDelete' => 'CASCADE'));
}
public function setTableDefinition()
{
$this->hasColumn('book_id', 'integer');
$this->hasColumn('name', 'string',20);
}
}