title: With SonataAdminBundle. Configure filter on a two step related entity
body: <p>I'd like to know weather is possible and how to configure a filter for the list view as the following with SonataAdminBundle in Symfony 2</p>
  
  <p>Say I have entities Order, pointing to entities User, pointing to entities Company.
  I want to configure filters both for filtering by User and also for filtering by Company (User's Company)
  The first is straight forward. The second is what I try to clearify.</p>
  
  <p>In the class OrderAdmin I would overwrite configureDatagridFilters as:</p>
  
  <pre class="lang-php prettyprint-override"><code>protected function configureDatagridFilters(DatagridMapper $datagridMapper)
  {
       $datagridMapper
           -&gt;add('created_at')
           //... some other filters on Order fields, as usual
  
           // the filter on User, provided 'user', no ploblem
           -&gt;add('user')
  
           // and the filter by Company 
           -&gt;add('user.company') // this doesn't work, of course
      ;
  }
  </code></pre>
  
  <p>That syntax for the company filter is inpired by sonta docs: <a href="http://sonata-project.org/bundles/doctrine-orm-admin/2-0/doc/reference/filter_field_definition.html" rel="noreferrer">http://sonata-project.org/bundles/doctrine-orm-admin/2-0/doc/reference/filter_field_definition.html</a></p>
  
  <p>Is not intended for what I try to acomplish, but cannot find where to look at.</p>
  
  <p>Hope someone has a clue on this.</p>
  
  <p>Thanks</p>