Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: Git Master
-
Fix Version/s: Git Master
-
Component/s: DQL
-
Security Level: All
-
Labels:None
Description
Similar to this issue I think, but triggered when performing a query on entities modelled with Class Table Inheritance, e.g.
$qb = $repository->createQueryBuilder('entity');
$metadata = $em->getClassMetadata($class);
$qb->where('entity INSTANCE OF :type')->setParameter('type', $metadata);
$qb->getQuery()->execute();
Seems that there isn't a corresponding entry in the parameter mapping array for this clause, which triggers the exception at line 254 of Doctrine\ORM\Query:
if (count($paramMappings) != count($this->parameters))
{ throw QueryException::invalidParameterNumber(); }