title: Symfony Service setting NULL data
body: <p>I've been having several issues with creating a service in Symfony 2.0, but have found workarounds for everything but the service setting null data.</p>
  
  <pre><code>public function logAction($request, $entityManager)
  {
      $logs = new Logs();
      $logs-&gt;setRoute = $request-&gt;get('_route');
      $logs-&gt;setController = $request-&gt;get('_controller');
      $logs-&gt;setRequest = json_encode($request-&gt;attributes-&gt;all());
      $logs-&gt;setPath = $request-&gt;server-&gt;get('PATH_INFO');
      $logs-&gt;setIp = $request-&gt;server-&gt;get('REMOTE_ADDR');
  
      $em = $entityManager;
      $em-&gt;persist($logs);
      $em-&gt;flush();
  }
  </code></pre>
  
  <p>I'm passing the EntityManager when calling the service in another controller, I'll post that code just in case:</p>
  
  <pre><code>public function pageAction($id = null, Request $request)
  {
      $log = $this-&gt;get('logging');
      $log-&gt;logAction($request, $this-&gt;getDoctrine()-&gt;getEntityManager());
  
      return $this-&gt;render('AcmeDemoBundle:Demo:viewPage.html.twig', array('name' =&gt; $id));
  }
  </code></pre>
  
  <p>I have created a services.yml file following the official docs (in the Log Bundle) and an actual row is inserted, but all fields are set to NULL. If I try to do a die in one of the setters in the entity file it doesn't die, so it seems like something isn't making it. (I have both the EntityManager and Entity files used at the top of the log service file before anyone asks)</p>
  
  <p>Any help would be greatly appreciated.</p>