title: findBy from repository trigger Internal error but not local
body: <p>I'm quite lost with this one...I don't know what could possibly be wrong.</p>
  
  <p>I have this piece of code which simply look for all messages from a place.
  The place cannot be null as you can see.</p>
  
  <p>In dev mode, I have no error.
  In prod mode, the findBy triggers an internal error.
  I'm sure this is it, because I can go into the first commented Json return with no error, but I can't reach the second one. </p>
  
  <p>I'm also sure the error is on the findBy and not the repository because I have tried to separate in two lines and there is no error wuth the getRepository.</p>
  
  <pre><code>    if (!isset($place)) {
          return new JsonResponse([
              'success' =&gt; false,
              'message' =&gt; "Place invalide"
          ]);
      }
      /*return new JsonResponse([
          'success' =&gt; false,
          'message' =&gt; "test0",
      ]);*/
  
      $messages_place = $em-&gt;getRepository('AppBundle:MessagePlace')-&gt;findBy(array('idPlace' =&gt;$place));
      return new JsonResponse([
          'success' =&gt; false,
          'message' =&gt; "test",
      ]);
  </code></pre>
  
  <p>In my MessagePlace entity I have</p>
  
  <pre><code>/**
   * @var \AppBundle\Entity\Place
   *
   * @ORM\ManyToOne(targetEntity="Place")
   * @ORM\JoinColumns({
   *   @ORM\JoinColumn(name="id_place", referencedColumnName="id")
   * })
   */
  private $idPlace;
  </code></pre>
  
  <p>I can't understand why this piece of code would trigger an error 500 on server but not in localhost.</p>
  
  <p>Thanks for your assistance. </p>
  
  <p>EDIT: My bad problem solved, I had a typo issue in my MessagePlace I was querying an id_image instead of is_image...Sorry.</p>