/** * @return File */ public function getFile() { throw new \Exception('Dont use me bro.'); if (empty($this->fileId)) { return; } $fs = ObjectRepository::getFileStorage($this); $em = $fs->getDoctrineEntityManager(); $file = $em->find(File::CN(), $this->fileId); return $file; }