我发现我不能做类似下面的事情,注意' :user
'被使用了两次
$query = $em->createQuery('select p from Application\Models\Project p
WHERE p.owner = :user
OR :user MEMBER OF p.collaborators');
$query->setParameter('user', $user);
我收到错误“ array_combine(): Both parameters should have an equal number of elements
”
我可以通过执行以下操作来解决问题
$query = $em->createQuery('select p from Application\Models\Project p
WHERE p.owner = :user
OR :user1 MEMBER OF p.collaborators');