protected function getUpdateValues(TActiveRecord $record)
{
$values = array();
$tableInfo = $this->getCommand($record)->getTableInfo();
$primary = array();
foreach ($tableInfo->getColumns() as $name => $column) {
if ($column->getIsExcluded()) {
continue;
}
$value = $record->getColumnValue($name);
if (!$column->getAllowNull() && $value === null && $column->getDefaultValue() === TDbTableColumn::UNDEFINED_VALUE) {
throw new TActiveRecordException('ar_value_must_not_be_null', get_class($record), $tableInfo->getTableFullName(), $name);
}
if ($column->getIsPrimaryKey()) {
$primary[$name] = $value;
} else {
$values[$name] = $value;
}
}
return array($values, $primary);
}