private function primaryKeyIsDefined() { $field = $this->getField($this->getPrimaryKey()); if ($field == null || $field == '') { return false; } return true; }