diff options
author | xue <> | 2007-09-29 22:07:12 +0000 |
---|---|---|
committer | xue <> | 2007-09-29 22:07:12 +0000 |
commit | 54e9feab491bcf8d1a95b486b68605cb4441e603 (patch) | |
tree | bffc84037861293872f5db616345888ffbd0e453 /demos/quickstart/protected/pages/Database/ActiveRecord.page | |
parent | 109ff4ee3bec41d95a122c6a69ad204c5dcfe099 (diff) |
Changed RELATIONS declaration.
Diffstat (limited to 'demos/quickstart/protected/pages/Database/ActiveRecord.page')
-rw-r--r-- | demos/quickstart/protected/pages/Database/ActiveRecord.page | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/demos/quickstart/protected/pages/Database/ActiveRecord.page b/demos/quickstart/protected/pages/Database/ActiveRecord.page index ce92f489..a6e087b9 100644 --- a/demos/quickstart/protected/pages/Database/ActiveRecord.page +++ b/demos/quickstart/protected/pages/Database/ActiveRecord.page @@ -627,7 +627,7 @@ class TeamRecord extends TActiveRecord public $players=array(); //define the $player member having has many relationship with PlayerRecord - protected static $RELATIONS=array + public static $RELATIONS=array ( 'players' => array(self::HAS_MANY, 'PlayerRecord'), ); @@ -710,7 +710,7 @@ class PlayerRecord extends TActiveRecord public $skills=array(); public $profile; - protected static $RELATIONS=array + public static $RELATIONS=array ( 'team' => array(self::BELONGS_TO, 'TeamRecord'), 'skills' => array(self::HAS_MANY, 'SkillRecord', 'Player_Skills'), @@ -767,7 +767,7 @@ class ProfileRecord extends TActiveRecord public $player; - protected static $RELATIONS=array + public static $RELATIONS=array ( 'player' => array(self::BELONGS_TO, 'PlayerRecord'), ); @@ -813,7 +813,7 @@ class Category extends TActiveRecord public $parent_category; public $child_categories=array(); - protected static $RELATIONS=array + public static $RELATIONS=array ( 'parent_category' => array(self::BELONGS_TO, 'Category'), 'child_categories' => array(self::HAS_MANY, 'Category'), @@ -867,7 +867,7 @@ class SkillRecord extends TActiveRecord public $players=array(); - protected static $RELATIONS=array + public static $RELATIONS=array ( 'players' => array(self::HAS_MANY, 'PlayerRecord', 'Player_Skills'), ); @@ -949,7 +949,7 @@ class Item extends TActiveRecord public $related_item_id; public $related_items=array(); - protected static $RELATIONS=array + public static $RELATIONS=array ( 'related_items' => array(self::HAS_MANY, 'Item', 'related_items.related_item_id'), |