/** * @return bool */ public function isPrimaryKey() { $pk = $this->table->getPrimaryKey(); return $pk === null ? false : in_array($this, $pk->getColumns()); }