Next try to update the last post field in ForumTopic and ForumTopicGroup

This commit is contained in:
Polonkai Gergely
2012-07-09 13:37:01 +02:00
parent de42154b51
commit 0fad11ffd0
3 changed files with 8 additions and 7 deletions

View File

@@ -63,14 +63,10 @@ class ForumController extends Controller
$post->setCreatedAt(new \DateTime('now'));
$post->setCreatedBy($this->get('security.context')->getToken()->getUser());
$post->setTopic($topic);
$topicGroup->setLastPost($post);
$topic->setLastPost($post);
$em = $this->getDoctrine()->getEntityManager();
$em->persist($post);
// FIXME: Make this next 2 lines work!
$em->persist($topic);
$em->persist($topicGroup);
$em->flush();
return $this->redirect($this->generateUrl('KekRozsakFrontBundle_forum_post_list', array(