private function set_primary_key()
{
if (($pk = $this->class->getStaticPropertyValue('pk', null)) || ($pk = $this->class->getStaticPropertyValue('primary_key', null))) {
$this->pk = is_array($pk) ? $pk : array($pk);
} else {
$this->pk = array();
foreach ($this->columns as $c) {
if ($c->pk) {
$this->pk[] = $c->inflected_name;
}
}
}
}