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

14 lines
391 B
PHP

<?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'));
}
}