Skip to content


DDC-1356: DQL does not accept a parameter containing Entities #1974

doctrinebot opened this Issue · 3 comments

2 participants


Jira issue originally created by user @guilhermeblanco:

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';

$userB = new CmsUser;
$userB->name = 'Roman';
$userB->username = 'romanb';
$userB->status = 'developer';


$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

Comment created by @guilhermeblanco:

Fixed in 3b3186e


Issue was closed with resolution "Fixed"


Comment created by @beberlei:


@doctrinebot doctrinebot added this to the 2.1.2 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.