added new models for some tests coming in the next commit
This commit is contained in:
parent
04f1a135cf
commit
19de41b1bf
2 changed files with 22 additions and 0 deletions
|
@ -5,4 +5,6 @@ class Email extends Doctrine_Record
|
|||
{
|
||||
$this->hasColumn('address', 'string', 150, 'email|unique');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
20
models/gnatUser.php
Normal file
20
models/gnatUser.php
Normal 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'));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue