0

I have a many to many relation between two entities in my bundle. I want to make this relation bidirectionnal. The problem is that after that I will add a request on one entity that will use the other as a parameter :

this is in the repository of the entityA

public function findType($type,$superior)
{

$qb = $this->_em->createQueryBuilder();

  $qb->select('a')
     ->from('xxxBundle:Profile', 'a')
     ->where('a.type = :type')
     ->andwhere('a.entityB = :superior')
     ->setParameter('superior', $superior) 
     ->setParameter('type', $type);


  $entities=$qb->getQuery()->getResult();
  return $entities;
}

I get the following exception

[Semantical Error] line 0, col 84 near 'entityB = :s': Error: Invalid PathExpression. StateFieldPathExpression or SingleValuedAssociationField expected. 

Any ideas?????

user2269869
  • 181
  • 1
  • 3
  • 15

0 Answers0