Changeset 2323
- Timestamp:
- 10/21/2007 03:52:05 PM (15 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
HISTORY (modified) (1 diff)
-
UPGRADE (modified) (1 diff)
-
demos/quickstart/protected/pages/Database/ActiveRecord.page (modified) (2 diffs)
-
framework/Data/ActiveRecord/TActiveRecordGateway.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/HISTORY
r2322 r2323 4 4 CHG: Changed TConditional so that the controls in its template behave like they are in its parent (Qiang) 5 5 CHG: Active Record many-to-many relationship change from self::HAS_MANY to self::MANY_TO_MANY (Wei) 6 CHG: Active Record no longer automatically performs adding/removing/updating related objects (Qiang) 6 7 ENH: Ticket#722 - Add Read Only capabilities to TInPlaceTextBox (Christophe) 7 8 ENH: Active Record supports multiple foreign references of the same table (Wei) -
trunk/UPGRADE
r2309 r2323 14 14 - The RELATIONS type declaration in Active Record classes for Many-to-Many using 15 15 an association table was change from "self::HAS_MANY" to "self::MANY_TO_MANY". 16 E.g. change 16 E.g. change 17 17 'albums' => array(self::HAS_MANY, 'Artist', 'album_artists') 18 18 to 19 19 'albums' => array(self::MANY_TO_MANY, 'Artist', 'album_artists') 20 - Active Record no longer automatically adds/removes/updates related objects. 20 21 21 22 -
trunk/demos/quickstart/protected/pages/Database/ActiveRecord.page
r2317 r2323 1011 1011 </div> 1012 1012 1013 <!--- 1013 1014 <h2 id="142014">Adding/Removing/Updating Related Objects</h2> 1014 1015 … … 1049 1050 // and 'fk2' is the primary key value of a skill 1050 1051 </com:TTextHighlighter> 1052 ---> 1051 1053 1052 1054 <h2 id="142015">Lazy Loading Related Objects</h2> -
trunk/framework/Data/ActiveRecord/TActiveRecordGateway.php
r2261 r2323 259 259 public function insert(TActiveRecord $record) 260 260 { 261 $this->updateAssociatedRecords($record,true);261 //$this->updateAssociatedRecords($record,true); 262 262 $result = $this->getCommand($record)->insert($this->getInsertValues($record)); 263 263 if($result) 264 264 $this->updatePostInsert($record); 265 $this->updateAssociatedRecords($record);265 //$this->updateAssociatedRecords($record); 266 266 return $result; 267 267 } … … 314 314 public function update(TActiveRecord $record) 315 315 { 316 $this->updateAssociatedRecords($record,true);316 //$this->updateAssociatedRecords($record,true); 317 317 list($data, $keys) = $this->getUpdateValues($record); 318 318 $result = $this->getCommand($record)->updateByPk($data, $keys); 319 $this->updateAssociatedRecords($record);319 //$this->updateAssociatedRecords($record); 320 320 return $result; 321 321 }
