From 4ceba82b9863f2c6323cbe00407e4bfbedbfc1cd Mon Sep 17 00:00:00 2001 From: wei <> Date: Mon, 8 Oct 2007 03:24:07 +0000 Subject: Allow active records to have multiple foreign key references to the same table. Add TXCache. --- tests/simple_unit/ActiveRecord/ForeignObjectUpdateTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/simple_unit/ActiveRecord/ForeignObjectUpdateTest.php') diff --git a/tests/simple_unit/ActiveRecord/ForeignObjectUpdateTest.php b/tests/simple_unit/ActiveRecord/ForeignObjectUpdateTest.php index 36864f77..026efb4d 100644 --- a/tests/simple_unit/ActiveRecord/ForeignObjectUpdateTest.php +++ b/tests/simple_unit/ActiveRecord/ForeignObjectUpdateTest.php @@ -52,7 +52,7 @@ class PlayerRecord extends BaseFkRecord public static $RELATIONS=array ( - 'skills' => array(self::HAS_MANY, 'SkillRecord', 'player_skills'), + 'skills' => array(self::MANY_TO_MANY, 'SkillRecord', 'player_skills'), 'team' => array(self::BELONGS_TO, 'TeamRecord'), 'profile' => array(self::HAS_ONE, 'ProfileRecord'), ); @@ -112,7 +112,7 @@ class SkillRecord extends BaseFkRecord public static $RELATIONS=array ( - 'players' => array(self::HAS_MANY, 'PlayerRecord', 'player_skills'), + 'players' => array(self::MANY_TO_MANY, 'PlayerRecord', 'player_skills'), ); public static function finder($className=__CLASS__) @@ -236,6 +236,7 @@ class ForeignObjectUpdateTest extends UnitTestCase $this->assertEqual($player4->skills[1]->name, 'Skip'); $this->assertEqual($player4->skills[2]->name, 'Push'); } +//*/ } ?> \ No newline at end of file -- cgit v1.2.3