/** * It gets the next primary key id * * @return string the next id, or false when the table dont have a primary key */ private function getNextId() { if ($this->getPrimaryKey() !== NULL) { $_pk = $this->pk; $id = ActiveRecord::$conn->getIdGenerator()->getId($this->pk); $this->{$_pk} = $id; return $id; } else { return false; } }