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.