This commit is contained in:
parent
71338c3d09
commit
b4edcf34a4
@ -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()
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user