1
0
mirror of synced 2025-01-20 23:41:39 +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'); $rel = $r->getRelation('Email');
$this->assertTrue($rel instanceof Doctrine_Relation_ForeignKey); $this->assertTrue($rel instanceof Doctrine_Relation_LocalKey);
} }
public function testGetRelationReturnsForeignKeyObjectForOneToManyRelation() public function testGetRelationReturnsForeignKeyObjectForOneToManyRelation()
{ {

View File

@ -4,7 +4,7 @@ class Entity extends Doctrine_Record {
$this->ownsOne('Email', 'Entity.email_id'); $this->ownsOne('Email', 'Entity.email_id');
$this->ownsMany('Phonenumber', 'Phonenumber.entity_id'); $this->ownsMany('Phonenumber', 'Phonenumber.entity_id');
$this->ownsOne('Account', 'Account.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() { public function setTableDefinition() {
$this->hasColumn('id', 'integer',20, 'autoincrement|primary'); $this->hasColumn('id', 'integer',20, 'autoincrement|primary');