title: symfony 2 doctrine 2
body: <p>I create method for select current premises foto, all works good</p>
  
  <pre><code>public function findByDistrictIds($criteria)
  {
      $q = $this-&gt;getEntityManager()-&gt;
              createQuery('SELECT f.id, f.path FROM RealestateCoreBundle:Foto f WHERE f.premises in (:criteria)');
      $q-&gt;setParameter('criteria', $criteria);
      return $q-&gt;getResult();
  }
  </code></pre>
  
  <p>but when I add to select command "f.premises", get error </p>
  
  <blockquote>
    <p>[Semantical Error] line 0, col 23 near 'premises FROM': Error: Invalid PathExpression. Must be a StateFieldPathExpression.</p>
  </blockquote>
  
  <p>How i can get foto with premises_id? And how use "WHERE IN" clause in queryBuilder?</p>