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