<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Tue Jun 18 06:31:21 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-2059/DDC-2059.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-2059] Property perceived as dumplicate in composite foreign key</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2059</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;I have the following schema:&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;
CREATE TABLE `user` (
  `id` &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(10) unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
);

CREATE TABLE `project` (
  `id` &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
);

CREATE TABLE `project_conversation` (
  `project_id` &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(10) unsigned NOT NULL,
  `user_id` &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;(10) unsigned NOT NULL,
  PRIMARY KEY (`project_id`,`user_id`)
)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I have ommitted the foreign key definitions for better readability. When I execute doctrine:mapping:convert (in Symfony2, but it seems it&apos;s a Doctrine2 issue), I get the following error:&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;
[Doctrine\ORM\Mapping\MappingException]                                               
Property &lt;span class=&quot;code-quote&quot;&gt;&quot;user&quot;&lt;/span&gt; in &lt;span class=&quot;code-quote&quot;&gt;&quot;Project&quot;&lt;/span&gt; was already declared, but it must be declared only once
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I have tracked down the issue to be caused by the existence of `user_id` in the project table. So basically, because `project_conversation` references `project` which in turn references `user`, `project_conversation` reference to `user` is perceived as duplicate.&lt;/p&gt;

&lt;p&gt;I don&apos;t think that this should be the expected behavior though. user_id in `project` references the creator of the project while user_id in `project_conversation` references the creator of the conversation and thus I think the schema is valid.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14101">DDC-2059</key>
            <summary>Property perceived as dumplicate in composite foreign key</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="dimboz">Dimitris Bozelos</reporter>
                        <labels>
                    </labels>
                <created>Thu, 4 Oct 2012 16:25:15 +0000</created>
                <updated>Fri, 5 Oct 2012 18:08:12 +0000</updated>
                    <resolved>Fri, 5 Oct 2012 18:08:12 +0000</resolved>
                            <version>2.1.3</version>
                                <fixVersion>2.2.4</fixVersion>
                <fixVersion>2.3.1</fixVersion>
                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="18779" author="beberlei" created="Fri, 5 Oct 2012 18:08:12 +0000"  >&lt;p&gt;Will be fixed in 2.2.4 and 2.3.1&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>