title: Router and {slug} to retrieve entity
body: <p>In an entity, I've define a slug with the DoctrineExtension, I use it in my href. But... I've a problem with the Router and/or ParamConverter.</p>
  
  <p>In my controller:</p>
  
  <pre><code>/**
   * @Route("/{slug}", name="strain_view")
   * @ParamConverter("strain", class="AppBundle:Strain", options={
   *     "repository_method" = "findOneWithAll",
   * })
   * @Security("is_granted('STRAIN_VIEW', strain)")
   */
  public function viewAction(Strain $strain)
  {
      return $this-&gt;render('strain/view.html.twig', [
          'strain' =&gt; $strain,
      ]);
  }
  </code></pre>
  
  <p>And I've this error: </p>
  
  <blockquote>
    <p>SQLSTATE[HY093]: Invalid parameter number: parameter was not defined</p>
  </blockquote>
  
  <p>In the debug bar, I see, the problem is the array in array:</p>
  
  <blockquote>
    <p>Parameters: [ 0 => [ slug => t1p-0004-e-coli-pgem-t-promupf3-leu2-termupf3 ] ]</p>
  </blockquote>
  
  <p>When I replace in @Route: {slug} by {id} and I manually type the url, I've</p>
  
  <blockquote>
    <p>Parameters: [0 => t1p-0004-e-coli-pgem-t-promupf3-leu2-termupf3]</p>
  </blockquote>
  
  <p>And... it's work, but in my Repository I've:</p>
  
  <pre><code>public function findOneWithAll($slug)
  {
      $query = $this-&gt;createQueryBuilder('strain')
              -&gt;where('strain.slug = :slug')
              -&gt;setParameter('slug', $slug)
              -&gt;getQuery();
  </code></pre>
  
  <p>I don't understand why.</p>