1
0
mirror of synced 2024-12-14 07:06:04 +03:00
This commit is contained in:
zYne 2007-05-22 15:59:44 +00:00
parent 71338c3d09
commit b4edcf34a4
2 changed files with 3 additions and 3 deletions

View File

@ -152,7 +152,7 @@ class Doctrine_Relation_Parser_TestCase extends Doctrine_UnitTestCase
$rel = $r->getRelation('Email');
$this->assertTrue($rel instanceof Doctrine_Relation_ForeignKey);
$this->assertTrue($rel instanceof Doctrine_Relation_LocalKey);
}
public function testGetRelationReturnsForeignKeyObjectForOneToManyRelation()
{
@ -162,7 +162,7 @@ class Doctrine_Relation_Parser_TestCase extends Doctrine_UnitTestCase
$r->bind('Phonenumber', $p);
$rel = $r->getRelation('Phonenumber');
$this->assertTrue($rel instanceof Doctrine_Relation_ForeignKey);
}
public function testGetRelationReturnsForeignKeyObjectForManytToManyRelation()

View File

@ -4,7 +4,7 @@ class Entity extends Doctrine_Record {
$this->ownsOne('Email', 'Entity.email_id');
$this->ownsMany('Phonenumber', 'Phonenumber.entity_id');
$this->ownsOne('Account', 'Account.entity_id');
$this->hasMany('Entity', 'EntityReference.entity1-entity2');
$this->hasMany('Entity', array('local' => 'entity1', 'foreign' => 'entity2'));
}
public function setTableDefinition() {
$this->hasColumn('id', 'integer',20, 'autoincrement|primary');