summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Database/id
diff options
context:
space:
mode:
authorwei <>2007-10-08 03:24:07 +0000
committerwei <>2007-10-08 03:24:07 +0000
commit4ceba82b9863f2c6323cbe00407e4bfbedbfc1cd (patch)
treebc93498b5bf77b25c5a2d5a87ffaa4f8a9b70728 /demos/quickstart/protected/pages/Database/id
parentaedbfe04daaaa0baa8e97c4d7d13e8a1f9d867cb (diff)
Allow active records to have multiple foreign key references to the same table. Add TXCache.
Diffstat (limited to 'demos/quickstart/protected/pages/Database/id')
-rw-r--r--demos/quickstart/protected/pages/Database/id/ActiveRecord.page8
1 files changed, 4 insertions, 4 deletions
diff --git a/demos/quickstart/protected/pages/Database/id/ActiveRecord.page b/demos/quickstart/protected/pages/Database/id/ActiveRecord.page
index b7b9e612..7273640d 100644
--- a/demos/quickstart/protected/pages/Database/id/ActiveRecord.page
+++ b/demos/quickstart/protected/pages/Database/id/ActiveRecord.page
@@ -615,7 +615,7 @@ class PlayerRecord extends TActiveRecord
public static $RELATIONS=array
(
'team' => array(self::BELONGS_TO, 'TeamRecord'),
- 'skills' => array(self::HAS_MANY, 'SkillRecord', 'Player_Skills'),
+ 'skills' => array(self::MANY_TO_MANY, 'SkillRecord', 'Player_Skills'),
'profile' => array(self::HAS_ONE, 'ProfileRecord'),
);
@@ -737,7 +737,7 @@ class SkillRecord extends TActiveRecord
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__)
@@ -749,7 +749,7 @@ class SkillRecord extends TActiveRecord
<p id="710036" class="block-content">
Properti statis <tt>$RELATIONS</tt> dari SkillRecord mendefinisikan bahwa properti <tt>$players</tt> memiliki banyak <tt>PlayerRecord</tt>s melalui tabel asosiasi '<tt>Player_Skills</tt>'.
-Dalam <tt>array(self::HAS_MANY, 'PlayerRecord', 'Player_Skills')</tt>, elemen pertama mendefinisikan tipe hubungan, dalam hal ini <strong><tt>self::HAS_MANY</tt></strong>,
+Dalam <tt>array(self::MANY_TO_MANY, 'PlayerRecord', 'Player_Skills')</tt>, elemen pertama mendefinisikan tipe hubungan, dalam hal ini <strong><tt>self::HAS_MANY</tt></strong>,
elemen kedua adalah string <tt>'PlayerRecord'</tt> yang terkait ke nama kelas dari kelas <tt>PlayerRecord</tt>, dan elemen ketiga adalah nama dari nama tabel asosiasi.
</p>
<p id="710037" class="block-content">
@@ -805,7 +805,7 @@ class Item extends TActiveRecord
public static $RELATIONS=array
(
- 'related_items' => array(self::HAS_MANY,
+ 'related_items' => array(self::MANY_TO_MANY,
'Item', 'related_items.related_item_id'),
);
}