From 13a99c30ea5d8b8ee587640800b03275fa5b1f3b Mon Sep 17 00:00:00 2001 From: Michael Ridgway Date: Thu, 9 Sep 2010 10:24:10 -0400 Subject: [PATCH] Fixed example in Establishing Associations --- manual/en/working-with-associations.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manual/en/working-with-associations.txt b/manual/en/working-with-associations.txt index 9094380c1..06dd1f767 100644 --- a/manual/en/working-with-associations.txt +++ b/manual/en/working-with-associations.txt @@ -183,8 +183,8 @@ In the case of bi-directional associations you have to update the fields on both $user->getAuthoredComments()->add($newComment); $newComment->setAuthor($user); - $em->persist(); - $m->flush(); + $em->persist($newComment); + $em->flush(); Notice how always both sides of the bidirectional association are updated. The previous unidirectional associations were simpler to handle.