1
0
mirror of synced 2024-12-13 14:56:01 +03:00

added new models for some tests coming in the next commit

This commit is contained in:
gnat 2007-09-19 21:24:59 +00:00
parent 04f1a135cf
commit 19de41b1bf
2 changed files with 22 additions and 0 deletions

View File

@ -5,4 +5,6 @@ class Email extends Doctrine_Record
{
$this->hasColumn('address', 'string', 150, 'email|unique');
}
}

20
models/gnatUser.php Normal file
View File

@ -0,0 +1,20 @@
<?php
class gnatUserTable { }
class gnatUser extends Doctrine_Record
{
public function setTableDefinition()
{
$this->hasColumn('name', 'string', 150);
$this->hasColumn('email_id', 'integer', 10, array ( 'unique' => true,));
}
public function setUp()
{
parent::setUp();
$this->ownsOne('Email', array('local'=>'email_id','foreign'=>'id','onDelete'=>'CASCADE'));
}
}