public function prePersist() { $now = new Datetime(); $this->createdAt = $now; $this->updatedAt = $now; }