<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sat May 25 12:55:32 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-2313/DDC-2313.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-2313] Deep clone for DBAL QueryBuilder</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2313</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;This is basically a duplicate of another issue I stumbled across lately but cannot find here again. It added a __clone() function to the ORM QueryBuilder to allow this use case:&lt;br/&gt;
Create a base query and derive two different queries from it.&lt;/p&gt;

&lt;p&gt;I adopted the code for the DBAL QueryBuilder which is suffering the same issue (e.g. expressions were not cloned but shared between instances). The code is tested at least for my limited use case.&lt;/p&gt;


&lt;p&gt;    /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Deep clone of all expression objects in the SQL parts.&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@return void&lt;br/&gt;
     */&lt;br/&gt;
    public function __clone()&lt;br/&gt;
    {&lt;br/&gt;
        foreach ($this-&amp;gt;sqlParts as $part =&amp;gt; $elements) {&lt;br/&gt;
            if (is_array($this-&amp;gt;sqlParts&lt;span class=&quot;error&quot;&gt;&amp;#91;$part&amp;#93;&lt;/span&gt;)) {&lt;br/&gt;
                foreach ($this-&amp;gt;sqlParts&lt;span class=&quot;error&quot;&gt;&amp;#91;$part&amp;#93;&lt;/span&gt; as $idx =&amp;gt; $element) 
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: {                    if (is_object($element)) {
                        $this-&amp;gt;sqlParts[$part][$idx] = clone $element;
                    }                }&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;            } else if (is_object($elements)) &lt;/p&gt;
{
                $this-&amp;gt;sqlParts[$part] = clone $elements;
            }
&lt;p&gt;        }&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;        $params = array();&lt;/p&gt;

&lt;p&gt;        foreach ($this-&amp;gt;params as $param) &lt;/p&gt;
{
            $params[] = clone $param;
        }

&lt;p&gt;        $this-&amp;gt;params = $params;&lt;br/&gt;
    }&lt;/p&gt;</description>
                <environment></environment>
            <key id="14541">DDC-2313</key>
            <summary>Deep clone for DBAL QueryBuilder</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="tcm">Tim Mundt</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Feb 2013 22:33:34 +0000</created>
                <updated>Thu, 21 Feb 2013 22:33:34 +0000</updated>
                                    <version>2.2</version>
                                                <component>DQL</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>