public function save($allProperties = true) { if (!$this->getUUID() && !$this->getId()) { $this->setUUID(UUID::get()); } parent::save($allProperties); }