public function deleteById($tagId) { $tag = $this->findById($tagId); if ($tag != null) { foreach ($tag->getCards() as $c) { $c->removeTag($tag); } $this->em->flush(); } return parent::deleteById($tagId); }
public function deleteById($id) { $c = $this->findById($id); foreach ($c->getTags() as $t) { $c->removeTag($t); } $this->em->flush(); return parent::deleteById($id); }