Changeset 2323

Show
Ignore:
Timestamp:
10/21/2007 03:52:05 PM (15 months ago)
Author:
xue
Message:

AR no long adds/updates/deletes automatically.

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/HISTORY

    r2322 r2323  
    44CHG: Changed TConditional so that the controls in its template behave like they are in its parent (Qiang) 
    55CHG: Active Record many-to-many relationship change from self::HAS_MANY to self::MANY_TO_MANY (Wei) 
     6CHG: Active Record no longer automatically performs adding/removing/updating related objects (Qiang) 
    67ENH: Ticket#722 - Add Read Only capabilities to TInPlaceTextBox (Christophe) 
    78ENH: Active Record supports multiple foreign references of the same table (Wei) 
  • trunk/UPGRADE

    r2309 r2323  
    1414- The RELATIONS type declaration in Active Record classes for Many-to-Many using 
    1515  an association table was change from "self::HAS_MANY" to "self::MANY_TO_MANY". 
    16   E.g. change  
     16  E.g. change 
    1717     'albums' => array(self::HAS_MANY, 'Artist', 'album_artists') 
    1818  to 
    1919     'albums' => array(self::MANY_TO_MANY, 'Artist', 'album_artists') 
     20- Active Record no longer automatically adds/removes/updates related objects. 
    2021 
    2122 
  • trunk/demos/quickstart/protected/pages/Database/ActiveRecord.page

    r2317 r2323  
    10111011</div> 
    10121012 
     1013<!--- 
    10131014<h2 id="142014">Adding/Removing/Updating Related Objects</h2> 
    10141015 
     
    10491050// and 'fk2' is the primary key value of a skill 
    10501051</com:TTextHighlighter> 
     1052---> 
    10511053 
    10521054<h2 id="142015">Lazy Loading Related Objects</h2> 
  • trunk/framework/Data/ActiveRecord/TActiveRecordGateway.php

    r2261 r2323  
    259259        public function insert(TActiveRecord $record) 
    260260        { 
    261                 $this->updateAssociatedRecords($record,true); 
     261                //$this->updateAssociatedRecords($record,true); 
    262262                $result = $this->getCommand($record)->insert($this->getInsertValues($record)); 
    263263                if($result) 
    264264                        $this->updatePostInsert($record); 
    265                 $this->updateAssociatedRecords($record); 
     265                //$this->updateAssociatedRecords($record); 
    266266                return $result; 
    267267        } 
     
    314314        public function update(TActiveRecord $record) 
    315315        { 
    316                 $this->updateAssociatedRecords($record,true); 
     316                //$this->updateAssociatedRecords($record,true); 
    317317                list($data, $keys) = $this->getUpdateValues($record); 
    318318                $result = $this->getCommand($record)->updateByPk($data, $keys); 
    319                 $this->updateAssociatedRecords($record); 
     319                //$this->updateAssociatedRecords($record); 
    320320                return $result; 
    321321        }