function getEntityID() { if (isset($this->fields["id"])) { return $this->fields["id"]; } return -1; }