public function duplicateAction(Request $request, $id){ $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('ABundle:B')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find B entity.'); } $new_entity = clone $entity; $em = $this->getDoctrine()->getManager(); $em->persist($new_entity); $em->flush(); return $this->indexAction();}
Saturday, March 14, 2015
Symfony 2 - Duplicate an entity
Subscribe to:
Posts (Atom)
What's the quickest way to find duplicated files?
find . ! -empty -type f -exec md5sum {} + | sort | uniq -w32 -dD fdupes -r / linux_czkawka_gui.AppImage
-
sudo -u www-data /usr/local/bin/composer install --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader
-
sudo aptitude install sendemail sudo aptitude install libio-socket-ssl-perl sendEmail -f xxx@gmail.com -t xxx@gmail.com -u Teste_Assunt...