public function getPrimaryKey() { if (isset($this->primaryKey)) { return $this->primaryKey; } return 'id'; }