public function getNameAttribute()
{
foreach ($this->tableSchema->getColumnNames() as $name) {
foreach ($this->nameAttribute as $nameAttr) {
if (!strcasecmp($name, $nameAttr) || !strcasecmp($name, $this->tableSchema->fullName)) {
return $name;
}
}
}
/* @var $class ActiveRecord */
// $class = $this->modelClass;
$pk = empty($this->tableSchema->primaryKey) ? $this->tableSchema->getColumnNames()[0] : $this->tableSchema->primaryKey[0];
return $pk;
}