<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu Jun 20 03:19:28 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-1835/DDC-1835.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-1835] Cloning PersistentCollection affects internal collection of clone source</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1835</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When a PersistentCollection (PC) is loaded and is cloned before it is initialized, anything that is already in that collection will be duplicated if the collection is initialized after it has been marked dirty. The cause is a too late clone operation on the internal (Array)Collection (AC) in the PC.&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;PC is loaded, but not initialized. The internal AC is empty.&lt;/li&gt;
	&lt;li&gt;PC is cloned. PC&apos; calls initialize() in __clone()&lt;/li&gt;
	&lt;li&gt;PC&apos; fills AC (as that has not been cloned yet)&lt;/li&gt;
	&lt;li&gt;PC&apos; clones AC&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;As a result the AC in PC now contains elements, but PC still is uninitialized. If PC is afterwards initialized and dirty, the elements already in AC will be considered new and added again to the AC.&lt;/p&gt;

&lt;p&gt;The effect will be constraint violations in join tables due to duplicate entries.&lt;/p&gt;

&lt;p&gt;The clone method causing this has been introduced with commit &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/647bd2b2f295d2cbe7d0ee67f21be8a48bae3db5&quot; class=&quot;external-link&quot;&gt;647bd2b2f295d2cbe7d0ee67f21be8a48bae3db5&lt;/a&gt; on February 17th.&lt;/p&gt;</description>
                <environment></environment>
            <key id="13725">DDC-1835</key>
            <summary>Cloning PersistentCollection affects internal collection of clone source</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="5" iconUrl="http://www.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="k-fish">Karsten Dambekalns</reporter>
                        <labels>
                    </labels>
                <created>Thu, 24 May 2012 15:27:44 +0000</created>
                <updated>Sun, 27 May 2012 08:19:11 +0000</updated>
                    <resolved>Sun, 27 May 2012 08:19:11 +0000</resolved>
                            <version>2.2</version>
                                <fixVersion>2.1.7</fixVersion>
                <fixVersion>2.2.3</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="17980" author="k-fish" created="Thu, 24 May 2012 16:56:57 +0000"  >&lt;p&gt;Test and fix: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/356&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/356&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>