<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Mon May 20 09:21:17 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-875/DDC-875.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-875] Merge can sometimes add the same entity twice into a collection</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-875</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;When merging some cascade merge object-graphs, the same entity in a ManyToMany association can be put into a collection twice during doMerge.&lt;/p&gt;

&lt;p&gt;The attached patch should stop this from happening.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12094">DDC-875</key>
            <summary>Merge can sometimes add the same entity twice into a collection</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="5">Cannot Reproduce</resolution>
                    <security id="10000">All</security>
                        <assignee username="romanb">Roman S. Borschel</assignee>
                                <reporter username="ccapndave">Dave Keen</reporter>
                        <labels>
                    </labels>
                <created>Thu, 11 Nov 2010 08:50:47 +0000</created>
                <updated>Sun, 11 Mar 2012 20:46:45 +0000</updated>
                    <resolved>Sun, 11 Mar 2012 20:46:45 +0000</resolved>
                            <version>2.0-BETA4</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="14739" author="beberlei" created="Mon, 15 Nov 2010 15:02:58 +0000"  >&lt;p&gt;which conditions lead to this problem? I want to write a test for it&lt;/p&gt;</comment>
                    <comment id="14740" author="beberlei" created="Mon, 15 Nov 2010 15:06:39 +0000"  >&lt;p&gt;not doint the unwrap() but add() directly was a bugfix for one of your other issues .Why is unwrap in here again?&lt;/p&gt;</comment>
                    <comment id="14984" author="ccapndave" created="Mon, 20 Dec 2010 06:16:53 +0000"  >&lt;p&gt;Oops - that was a mistake.  I have attached multipleaddmerge2.diff which no longer uses unwrap to add the element.&lt;/p&gt;</comment>
                    <comment id="15028" author="beberlei" created="Mon, 27 Dec 2010 18:33:32 +0000"  >&lt;p&gt;That is exactly the same code in the patch, the lines are just formatted differently.&lt;/p&gt;</comment>
                    <comment id="15112" author="ccapndave" created="Thu, 6 Jan 2011 11:59:28 +0000"  >&lt;p&gt;Sorry, I am still getting the hang of git and diff and maybe what I put in there isn&apos;t what I meant to.  I have now pushed the code to the &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-875&quot; title=&quot;Merge can sometimes add the same entity twice into a collection&quot;&gt;&lt;del&gt;DDC-875&lt;/del&gt;&lt;/a&gt; branch on my ccapndave/doctrine2 fork on GitHub, hopefully this works better.&lt;/p&gt;

&lt;p&gt;As far as I can tell I am using unwrap() in order to check whether the element already exists in the array, but then calling &lt;del&gt;&amp;gt;add() directly on the PersistentCollection rather than the ArrayCollection, triggering $this&lt;/del&gt;&amp;gt;changed().&lt;/p&gt;</comment>
                    <comment id="15391" author="beberlei" created="Sat, 26 Feb 2011 10:07:40 +0000"  >&lt;p&gt;It seems even this issue is caused by multiple calls to persist. I cannot reproduce this with just a single bidirectional cascade merge.&lt;/p&gt;</comment>
                    <comment id="17545" author="asm89" created="Sun, 11 Mar 2012 20:46:45 +0000"  >&lt;p&gt;We cannot reproduce this error and haven&apos;t had similar complaints ever-since. Feel free to open a new issue with a failing testcase.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="10859" name="multipleaddmerge.diff" size="1161" author="ccapndave" created="Thu, 11 Nov 2010 08:50:47 +0000" />
                    <attachment id="10897" name="multipleaddmerge2.diff" size="1163" author="ccapndave" created="Mon, 20 Dec 2010 06:16:53 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>