<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Wed Jun 19 19:26:48 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/si/jira.issueviews:issue-xml/DDC-2177/DDC-2177.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DDC-2177] WHERE IN not working</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2177</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I&apos;m going by the docs, trying to get a WHERE IN type of query working with the query builder.&lt;/p&gt;

&lt;p&gt;I&apos;ve got a flat array of IDs, e.g. something like this:&lt;/p&gt;

&lt;p&gt;  $IDs = array( 228052, 265635, 344498, 391761, 329203, 317911, 305961, 299939, 249429, 344706 );&lt;/p&gt;

&lt;p&gt;I&apos;ve tried the following ways to get this working:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;using the Expr class:&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;  $qb-&amp;gt;add( &apos;where&apos;, $qb-&amp;gt;expr()-&amp;gt;in( &apos;c.id&apos;, &apos;:IDs&apos; ));&lt;br/&gt;
  $qb-&amp;gt;setParameter( &apos;IDs&apos;, $IDs );&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;alternatively:&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;  $qb-&amp;gt;add( &apos;where&apos;, $qb-&amp;gt;expr()-&amp;gt;in( &apos;c.id&apos;, $IDs ));&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;even direct DQL:&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;  $qb-&amp;gt;where( &apos;c.id IN (:IDs)&apos; );&lt;br/&gt;
  $qb-&amp;gt;setParameter( &apos;IDs&apos;, $IDs );&lt;/p&gt;

&lt;p&gt;The generated DQL looks fine:&lt;/p&gt;

&lt;p&gt;  SELECT c FROM MyEntity c WHERE c.id IN(&apos;228052&apos;, &apos;265635&apos;, &apos;344498&apos;, &apos;391761&apos;, &apos;329203&apos;, &apos;317911&apos;, &apos;305961&apos;, &apos;299939&apos;, &apos;249429&apos;, &apos;344706&apos;)&lt;/p&gt;

&lt;p&gt;But when I call execute() on that query, all these variations give me the following error:&lt;/p&gt;

&lt;p&gt;  Expected argument of type &quot;Doctrine\ORM\QueryBuilder&quot;, &quot;array&quot; given&lt;/p&gt;</description>
                <environment>Linux, Symfony 2, PHP 5.3.10</environment>
            <key id="14280">DDC-2177</key>
            <summary>WHERE IN not working</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="6" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/closed.png">Closed</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="userfriendly">Moritz Kraft</reporter>
                        <labels>
                    </labels>
                <created>Wed, 28 Nov 2012 18:18:56 +0000</created>
                <updated>Thu, 29 Nov 2012 14:08:43 +0000</updated>
                    <resolved>Wed, 28 Nov 2012 18:46:24 +0000</resolved>
                            <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19075" author="userfriendly" created="Wed, 28 Nov 2012 18:28:49 +0000"  >&lt;p&gt;never mind.... it was something i was doing wrong. &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; thank god...&lt;/p&gt;</comment>
                    <comment id="19076" author="ocramius" created="Wed, 28 Nov 2012 18:46:42 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=userfriendly&quot; class=&quot;user-hover&quot; rel=&quot;userfriendly&quot;&gt;Moritz Kraft&lt;/a&gt; what was it exactly?&lt;/p&gt;</comment>
                    <comment id="19078" author="userfriendly" created="Thu, 29 Nov 2012 14:08:43 +0000"  >&lt;p&gt;The error was thrown by the Symfony Form Framework, not Doctrine. Sorry about that. :-/&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>