title: reference to one Sonata Mongodb Admin Bundle
body: <p>I'm working on a symfony2 web-app, I've installed sonata Mongodb admin Bundle.but I have a little problem, My data model is 'Quizz' document which references a 'QuizzTemplate' document (reference to One). This is my Code :</p>
  
  <pre><code>protected function configureListFields(ListMapper $listMapper)
   {
      $listMapper
      -&gt;addIdentifier('uid')
      -&gt;add('name')
      -&gt;add('quizzTemplate', null, array("required" =&gt; false )
      -&gt;add ('User', null, array('label' =&gt; 'Candidat','required' =&gt; false, 'by_reference' =&gt; true))
      -&gt;add('_action', 'actions', array(
          'actions' =&gt; array(
              'view' =&gt; array(),
              'edit' =&gt; array(),
              )
          ))
      ;
  }
  
  protected function configureFormFields(FormMapper $formMapper)
  {
      $formMapper
      -&gt;add('uid')
      -&gt;add('name')  
      -&gt;add('quizzTemplate', null, array());
  
  
  
  }
  
  protected function configureShowFields(ShowMapper $showMapper)
  {
  
      $showMapper
          -&gt;add('name')
          -&gt;add('User')
          -&gt;add('numericresult',null ,array('label' =&gt; 'Resultat Global'))
  
      ;
  
  }
  
  
  protected function configureDatagridFilters(DatagridMapper $datagrid)
  {
      $datagrid
      -&gt;add('uid')
      -&gt;add('name') 
  
      ;
  }
  </code></pre>
  
  <p>In fact it works for the list mapper but it is not the case with the configure and show and this is the error : </p>
  
  <blockquote>
    <p>Error: Call to a member function getRepository() on a non-object</p>
  </blockquote>
  
  <p>I tried it this way : </p>
  
  <blockquote>
    <p>->add('quizzTemplate.id')</p>
  </blockquote>
  
  <p>and i got this : </p>
  
  <blockquote>
    <p>No document manager defined for class \ATS\QuizzBundle\Document\QuizzTemplate</p>
  </blockquote>
  
  <p>Any one know how to fix this ? Thank you</p>