From 15e28efdb463b0e88ed4461239a948893328c9aa Mon Sep 17 00:00:00 2001 From: zYne Date: Sun, 10 Jun 2007 19:04:53 +0000 Subject: [PATCH] --- tests/classes.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/classes.php b/tests/classes.php index b79de31bc..c928869a6 100644 --- a/tests/classes.php +++ b/tests/classes.php @@ -114,6 +114,17 @@ class User extends Entity { } } } +class SelfRefTest extends Doctrine_Record +{ + public function setTableDefinition() { + $this->hasColumn('name', 'string', 50); + $this->hasColumn('created_by', 'integer'); + } + public function setUp() + { + $this->hasOne('SelfRefTest as createdBy', array('local' => 'created_by')); + } +} class Groupuser extends Doctrine_Record { public function setTableDefinition() { $this->hasColumn('added', 'integer'); @@ -594,7 +605,7 @@ class NestTest extends Doctrine_Record } public function setUp() { - $this->hasMany('NestTest as Parents', 'NestReference.parent_id'); + $this->hasMany('NestTest as Parents', array('local' => 'child_id', 'foreign' => 'parent_id')); $this->hasMany('NestTest as Children', 'NestReference.child_id'); } }