34 lines
727 B
PHP
34 lines
727 B
PHP
<?php
|
|
|
|
/**
|
|
* This class has been auto-generated by the Doctrine ORM Framework
|
|
*/
|
|
abstract class BaseAdult extends Doctrine_Record
|
|
{
|
|
|
|
public function setTableDefinition()
|
|
{
|
|
$this->setTableName('adult');
|
|
$this->hasColumn('id', 'integer', 11, array('primary' => true,
|
|
'autoincrement' => true));
|
|
|
|
$this->hasColumn('name', 'string', 255);
|
|
$this->hasColumn('contact_id', 'integer', 11);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
public function setUp()
|
|
{
|
|
$this->hasOne('Contact', array('local' => 'contact_id',
|
|
'foreign' => 'id'));
|
|
|
|
$this->hasMany('Child as Children', array('local' => 'id',
|
|
'foreign' => 'adult_id'));
|
|
|
|
}
|
|
|
|
} |