Details
Description
Currently, it is impossible to provide an argument that is a collection of Entities. Example:
$userA = new CmsUser; $userA->name = 'Benjamin'; $userA->username = 'beberlei'; $userA->status = 'developer'; $this->_em->persist($userA); $userB = new CmsUser; $userB->name = 'Roman'; $userB->username = 'romanb'; $userB->status = 'developer'; $this->_em->persist($userB); $this->_em->flush(); $this->_em->clear(); $query = $this->_em->createQuery("SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u IN (?0)"); $query->setParameter(0, array($userA, $userB));
Returns this error currently:
Object of class Doctrine\Tests\Models\CMS\CmsUser could not be converted to string
Fixed in https://github.com/doctrine/doctrine2/commit/3b3186ee98392802a44118cd421a3530119aa7ea