public function getSingleBy($field, $id) { $result = parent::getSingleBy($field, $id); return $result ? $this->toEntity($result) : null; }