<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Mon May 20 14:24:05 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://doctrine-project.org/jira/si/jira.issueviews:issue-xml/DBAL-442/DBAL-442.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://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>[DBAL-442] Break the query building with multiple from parts</title>
                <link>http://doctrine-project.org/jira/browse/DBAL-442</link>
                <project id="10040" key="DBAL">Doctrine DBAL</project>
                        <description>&lt;p&gt;For example:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
$queryBuilder
    -&amp;gt;select(&apos;DISTINCT c.id&apos;)
    -&amp;gt;from(&apos;Campaigns&apos;, &apos;c&apos;)
    -&amp;gt;leftJoin(&apos;c&apos;, &apos;CampaignOperations&apos;, &apos;od&apos;, &apos;od.campaignId = c.id AND od.operation = :operation&apos;)
    -&amp;gt;from(&apos;BannerGroups&apos;, &apos;bg&apos;)
    -&amp;gt;innerJoin(&apos;bg&apos;, &apos;BannerGroupStrategies&apos;, &apos;bgs&apos;, &apos;bgs.groupId = bg.id AND bgs.advSystem = :system&apos;)
    -&amp;gt;where(&apos;bg.campaignId = c.id&apos;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Builded the query:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; DISTINCT c.id &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; Campaigns s 
  LEFT JOIN CampaignOperations od ON (od.campaignId = c.id AND od.operation = :operation)
  INNER JOIN BannerGroupStrategies bgs ON (bgs.groupId = bg.id AND bgs.advSystem = :system), 
  BannerGroups bg
  &lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; (bg.campaignId = c.id)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If this query execute on mysql, we get error: &lt;br/&gt;
SQLSTATE&lt;span class=&quot;error&quot;&gt;&amp;#91;42S22&amp;#93;&lt;/span&gt;: Column not found: 1054 Unknown column &apos;bg.id&apos; in &apos;on clause&apos;&lt;/p&gt;

&lt;p&gt;Expected result:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-sql&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;SELECT&lt;/span&gt; DISTINCT c.id &lt;span class=&quot;code-keyword&quot;&gt;FROM&lt;/span&gt; Campaigns s 
  LEFT JOIN CampaignOperations od ON (od.campaignId = c.id AND od.operation = :operation),
  BannerGroups bg
  INNER JOIN BannerGroupStrategies bgs ON (bgs.groupId = bg.id AND bgs.advSystem = :system)
  &lt;span class=&quot;code-keyword&quot;&gt;WHERE&lt;/span&gt; (bg.campaignId = c.id)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Regression after patch &lt;a href=&quot;https://github.com/doctrine/dbal/pull/175&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/175&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
            <key id="14472">DBAL-442</key>
            <summary>Break the query building with multiple from parts</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="yethee">Denis Vasilev</reporter>
                        <labels>
                        <label>mysql</label>
                    </labels>
                <created>Sun, 10 Feb 2013 10:25:02 +0000</created>
                <updated>Mon, 22 Apr 2013 14:51:48 +0000</updated>
                    <resolved>Mon, 22 Apr 2013 14:51:48 +0000</resolved>
                            <version>2.3.2</version>
                                <fixVersion>2.4</fixVersion>
                                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19523" author="yethee" created="Sun, 10 Feb 2013 14:59:51 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/doctrine/dbal/pull/270&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/270&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="20089" author="fabio.bat.silva" created="Mon, 22 Apr 2013 14:51:48 +0000"  >&lt;p&gt;Fixed by : &lt;a href=&quot;https://github.com/doctrine/dbal/commit/99574240f332a814ec193b6e7a88abb6a457f061&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/commit/99574240f332a814ec193b6e7a88abb6a457f061&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>