protected function filterAddedColumns($row)
{
// make an array with keys as acceptable attribute names
$acceptable_attrs = self::$primary_attr_names;
array_splice($acceptable_attrs, count($acceptable_attrs), 0, $this->secondary_attr_names);
$acceptable_attrs = array_combine($acceptable_attrs, $acceptable_attrs);
foreach ($row as $key => $val) {
if (!isset($acceptable_attrs[$key])) {
$this->additional_select_values[$key] = $val;
unset($row[$key]);
}
}
return $row;
}