Trying to update one table after inserting into another one with Symfony2 and Doctrine2
问题 I wrote a function in BudgetRepository that is called when inserting new data into Budget table. The function is: public function addBudgetToClient($clientId, $budgetId) { return $this->createQueryBuilder('b') ->update('PanelBundle:Client', 'c') ->set('c.budget', $budgetId) ->where('c.id = ' . $clientId) ->getQuery() ->execute(); } And the BudgetController does this: public function addAction(Request $request) { $form = $this->createForm(new BudgetType()); $manager = $this->getDoctrine()-