/** * Up Link in Multimedia Object * * @param MultimediaObject $multimediaObject * @param string $linkId * @return MultimediaObject */ public function upLinkInMultimediaObject(MultimediaObject $multimediaObject, $linkId) { $multimediaObject->upLinkById($linkId); $this->dm->persist($multimediaObject); $this->dm->flush(); // NOTE Workaround to fix embedded documents modifications $this->dm->clear(get_class($multimediaObject)); return $this->dm->find('PumukitSchemaBundle:MultimediaObject', $multimediaObject->getId()); }