<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 15:36:54 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-2079/DDC-2079.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-2079] Error in build entities using yml with several inversedJoinColumns</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2079</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Hello guys, sorry for the bad English found the error during a necessity and would like to post the solution.&lt;/p&gt;

&lt;p&gt;Below is an example of my yml relationamento a many to many.&lt;/p&gt;

&lt;p&gt;manyToMany:&lt;br/&gt;
        centroCustos:&lt;br/&gt;
            targetEntity: Album\Entity\CentroCusto&lt;br/&gt;
            cascade: &lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;persist&amp;quot;, &amp;quot;merge&amp;quot;&amp;#93;&lt;/span&gt;&lt;br/&gt;
            inversedBy: unidades&lt;br/&gt;
            joinTable:&lt;br/&gt;
                name: unidade_centro_custo&lt;br/&gt;
                joinColumns:&lt;br/&gt;
                    idunidade:&lt;br/&gt;
                        referencedColumnName: idunidade&lt;br/&gt;
                        onDelete: cascade&lt;br/&gt;
                inverseJoinColumns:&lt;br/&gt;
                    idcentrocusto:&lt;br/&gt;
                        referencedColumnName: idcentrocusto&lt;br/&gt;
                    idpais:&lt;br/&gt;
                        referencedColumnName: idpais&lt;br/&gt;
                    idmundo:&lt;br/&gt;
                        referencedColumnName: idmundo                        &lt;br/&gt;
                        onDelete: cascade&lt;/p&gt;

&lt;p&gt;Well this example is generating this code.&lt;/p&gt;

&lt;p&gt;  /**&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;@var \Doctrine\Common\Collections\ArrayCollection&lt;br/&gt;
     *&lt;/li&gt;
	&lt;li&gt;@ORM\ManyToMany(targetEntity=&quot;Album\Entity\CentroCusto&quot;, inversedBy=&quot;unidades&quot;, cascade=
{&quot;persist&quot;,&quot;merge&quot;}
&lt;p&gt;)&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;@ORM\JoinTable(name=&quot;unidade_centro_custo&quot;,&lt;/li&gt;
	&lt;li&gt;joinColumns=
{
     *     @ORM\JoinColumn(name=&quot;idunidade&quot;, referencedColumnName=&quot;idunidade&quot;, onDelete=&quot;cascade&quot;)
     *   }
&lt;p&gt;,&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;inverseJoinColumns=
{
     *     @ORM\JoinColumn(name=&quot;idcentrocusto&quot;, referencedColumnName=&quot;idcentrocusto&quot;)
     *     @ORM\JoinColumn(name=&quot;idpais&quot;, referencedColumnName=&quot;idpais&quot;)
     *     @ORM\JoinColumn(name=&quot;idmundo&quot;, referencedColumnName=&quot;idmundo&quot;, onDelete=&quot;cascade&quot;)
     *   }&lt;/li&gt;
	&lt;li&gt;)&lt;br/&gt;
     */&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Notice that Doctrine 2 is not putting commas to separate JoinColumns.&lt;/p&gt;

&lt;p&gt;So looking at the source code I found the following code and put it solved my problem.&lt;/p&gt;

&lt;p&gt;The changes was performed in EntityGenerator.php line 1090.&lt;/p&gt;

&lt;p&gt;                $arrJoins = array();&lt;br/&gt;
                foreach ($associationMapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;joinTable&amp;#39;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;joinColumns&amp;#39;&amp;#93;&lt;/span&gt; as $joinColumn) &lt;/p&gt;
{
                    $arrJoins[] = $this-&amp;gt;spaces . &apos; *     &apos; . $this-&amp;gt;generateJoinColumnAnnotation($joinColumn);
                }

&lt;p&gt;                $lines[] = implode(&quot;,&quot;. PHP_EOL, $arrJoins);&lt;br/&gt;
                $lines[] = $this-&amp;gt;spaces . &apos; *   },&apos;;&lt;br/&gt;
                $lines[] = $this-&amp;gt;spaces . &apos; *   inverseJoinColumns={&apos;;&lt;/p&gt;

&lt;p&gt;                $arrJoinsInverse = array();&lt;br/&gt;
                foreach ($associationMapping&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;joinTable&amp;#39;&amp;#93;&lt;/span&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;#39;inverseJoinColumns&amp;#39;&amp;#93;&lt;/span&gt; as $joinColumn) &lt;/p&gt;
{
                	
                	$arrJoinsInverse[] = $this-&amp;gt;spaces . &apos; *     &apos; . $this-&amp;gt;generateJoinColumnAnnotation($joinColumn);
                }

&lt;p&gt;                $lines[] = implode(&quot;,&quot;. PHP_EOL, $arrJoinsInverse);&lt;br/&gt;
                $lines[] = $this-&amp;gt;spaces . &apos; *   }&apos;;&lt;br/&gt;
                $lines[] = $this-&amp;gt;spaces . &apos; * )&apos;;              }&lt;/p&gt;

&lt;p&gt;I hope you understand what I&apos;m trying to say, for you do not know if this error occurred, but if there ocorrei is one possible solution.&lt;/p&gt;

&lt;p&gt;Thank you.&lt;/p&gt;</description>
                <environment>windows 7/php 5.3/apache 2.2</environment>
            <key id="14129">DDC-2079</key>
            <summary>Error in build entities using yml with several inversedJoinColumns</summary>
                <type id="1" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</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="fabio.bat.silva">Fabio B. Silva</assignee>
                                <reporter username="coisa2004">Andr&#233; Ant&#244;nio Lemos de Moraes</reporter>
                        <labels>
                    </labels>
                <created>Mon, 15 Oct 2012 14:14:30 +0000</created>
                <updated>Fri, 9 Nov 2012 21:18:00 +0000</updated>
                    <resolved>Sun, 21 Oct 2012 03:17:46 +0000</resolved>
                            <version>2.3</version>
                                <fixVersion>2.3.1</fixVersion>
                                <component>Tools</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>1</watches>
                        <comments>
                    <comment id="18856" author="fabio.bat.silva" created="Sun, 21 Oct 2012 03:17:46 +0000"  >&lt;p&gt;Fixed by : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/2c0feb2a46a7cf97dc2878e6214924c3ffdbce67&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/2c0feb2a46a7cf97dc2878e6214924c3ffdbce67&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>