1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tests_old/models/gnatUser.php

14 lines
391 B
PHP
Raw Normal View History

2007-09-20 23:58:34 +04:00
<?php
class gnatUserTable { }
class gnatUser extends Doctrine_Entity
{
public static function initMetadata($class)
{
$class->setColumn('name', 'string', 150);
$class->setColumn('foreign_id', 'integer', 10, array ('unique' => true));
$class->hasOne('gnatEmail as Email', array('local'=> 'foreign_id', 'foreign'=>'id', 'onDelete'=>'CASCADE'));
}
}