This class is use internally by passing a context to the TActiveRecordRelation constructor.
Since: 3.1
 /**
  * @return TActiveRecordRelationCommand
  */
 public function updateAssociatedRecords($updateBelongsTo = false)
 {
     $success = true;
     foreach ($this->_record->getRecordRelations() as $data) {
         list($property, $relation) = $data;
         $belongsTo = $relation[0] == TActiveRecord::BELONGS_TO;
         if ($updateBelongsTo && $belongsTo || !$updateBelongsTo && !$belongsTo) {
             $obj = $this->getSourceRecord();
             if (!$this->isEmptyFkObject($obj->getColumnValue($property))) {
                 $context = new TActiveRecordRelationContext($this->getSourceRecord(), $property, $relation);
                 $success = $context->getRelationHandler()->updateAssociatedRecords() && $success;
             }
         }
     }
     return $success;
 }
 protected function updateAssociatedRecords(TActiveRecord $record, $updateBelongsTo = false)
 {
     $context = new TActiveRecordRelationContext($record);
     return $context->updateAssociatedRecords($updateBelongsTo);
 }