<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Mon May 20 17:09:53 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/DDC-2109/DDC-2109.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>[DDC-2109] Duplicate joinTableColumns mapping for ManyToMany with resolve target entity</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2109</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I use the resolve target entity listener quite often for generic code. However I found an issue with ManyToMany relationships, when the target entity is modified by the listener.&lt;/p&gt;

&lt;p&gt;The problem is that the _validateAndCompleteManyToManyMapping in PersistentCollection duplicate the joinTableColumns, so this means that when creating an entity, Doctrine send twice the number of parameters, which of course fail.&lt;/p&gt;

&lt;p&gt;Here is a test that reproduce the problem.&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;
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function testAssertTableColumnsAreNotAddedInManyToMany()
    {
        $evm = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;em-&amp;gt;getEventManager();
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;listener-&amp;gt;addResolveTargetEntity(
            &apos;Doctrine\Tests\ORM\Tools\ResolveTargetInterface&apos;,
            &apos;Doctrine\Tests\ORM\Tools\ResolveTargetEntity&apos;,
            array()
        );
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;listener-&amp;gt;addResolveTargetEntity(
            &apos;Doctrine\Tests\ORM\Tools\TargetInterface&apos;,
            &apos;Doctrine\Tests\ORM\Tools\TargetEntity&apos;,
            array()
        );
        $evm-&amp;gt;addEventListener(Events::loadClassMetadata, $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;listener);
        $cm = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;factory-&amp;gt;getMetadataFor(&apos;Doctrine\Tests\ORM\Tools\ResolveTargetEntity&apos;);
        $meta = $cm-&amp;gt;associationMappings[&apos;manyToMany&apos;];

        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertSame(&apos;Doctrine\Tests\ORM\Tools\TargetEntity&apos;, $meta[&apos;targetEntity&apos;]);
        $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;assertEquals(array(&apos;resolvetargetentity_id&apos;, &apos;targetinterface_id&apos;), $meta[&apos;joinTableColumns&apos;]);
    }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>OS X 10.8</environment>
            <key id="14177">DDC-2109</key>
            <summary>Duplicate joinTableColumns mapping for ManyToMany with resolve target entity</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="bakura">Micha&#235;l Gallego</reporter>
                        <labels>
                    </labels>
                <created>Wed, 31 Oct 2012 09:37:54 +0000</created>
                <updated>Mon, 12 Nov 2012 14:50:16 +0000</updated>
                    <resolved>Mon, 12 Nov 2012 14:50:16 +0000</resolved>
                            <version>2.3</version>
                                <fixVersion>2.3.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                                <attachments>
                    <attachment id="11339" name="ResolveTargetEntityListenerTest.php" size="4321" author="bakura" created="Wed, 31 Oct 2012 09:37:54 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>