<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sat May 25 23:59:37 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-2161/DDC-2161.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-2161] Moving entity relationship doesn&apos;t move foreign key in mysql table</title>
                <link>http://doctrine-project.org/jira/browse/DDC-2161</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Edit: moved the bug to the dbal project, please delete this or set as invalid, new bug:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DBAL-392&quot; class=&quot;external-link&quot;&gt;http://www.doctrine-project.org/jira/browse/DBAL-392&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;------------------------------------------------------&lt;/p&gt;

&lt;p&gt;These are the steps I&apos;ve tried to reproduce the problem:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;composer create-project symfony/framework-standard-edition path/ 2.1.3&lt;/li&gt;
	&lt;li&gt;edited parameters for mysql db&lt;/li&gt;
	&lt;li&gt;created attached &apos;Post&apos; entity (note the parent/children fields)&lt;/li&gt;
	&lt;li&gt;updated schema with doctrine:schema:create&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I see that the foreign key in phpmyadmin is correctly set to Post.id which is correct.&lt;/p&gt;

&lt;p&gt;Now:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;created another entity &apos;Argument&apos;&lt;/li&gt;
	&lt;li&gt;moving the children field from &apos;Post&apos; to &apos;Argument&apos; removing setters getters into &apos;Post&apos; and changing target entity field accordingly&lt;/li&gt;
	&lt;li&gt;Updated DB schema (doctrine:schema:update --force)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The situation is now the one you can find in Post2 and Argument attachments.&lt;/p&gt;

&lt;p&gt;The problem is that now, the foreign key in Post field it&apos;s still on Post.id and not on Argument.id and schema:update says the DB is in sync with the metadata.&lt;/p&gt;

&lt;p&gt;Manually deleting the foreign key and running schema:update makes the key being correctly created into Argument.id&lt;/p&gt;</description>
                <environment>Mac OSX, mysql 5.5.28, php 5.4.8, fresh symfony install with doctrine/orm 77d060ab74212919f1eaace72842ea43bf420f43</environment>
            <key id="14257">DDC-2161</key>
            <summary>Moving entity relationship doesn&apos;t move foreign key in mysql table</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="6">Invalid</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="alex88">Alessandro Tagliapietra</reporter>
                        <labels>
                        <label>Cli</label>
                        <label>mysql</label>
                    </labels>
                <created>Thu, 22 Nov 2012 15:26:54 +0000</created>
                <updated>Sun, 25 Nov 2012 12:09:06 +0000</updated>
                    <resolved>Sun, 25 Nov 2012 12:08:58 +0000</resolved>
                            <version>Git Master</version>
                                                <component>Mapping Drivers</component>
                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>2</watches>
                        <comments>
                    <comment id="19042" author="beberlei" created="Sat, 24 Nov 2012 00:23:52 +0000"  >&lt;p&gt;A related Github Pull-Request &lt;span class=&quot;error&quot;&gt;&amp;#91;GH-234&amp;#93;&lt;/span&gt; was opened&lt;br/&gt;
&lt;a href=&quot;https://github.com/doctrine/dbal/pull/234&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/dbal/pull/234&lt;/a&gt;&lt;/p&gt;</comment>
                    <comment id="19049" author="beberlei" created="Sun, 25 Nov 2012 12:08:58 +0000"  >&lt;p&gt;On wrong project, see &lt;a href=&quot;http://doctrine-project.org/jira/browse/DBAL-392&quot; title=&quot;Moving entity relationship doesn&amp;#39;t move foreign key in mysql table&quot;&gt;&lt;del&gt;DBAL-392&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                <issuelinks>
                        <issuelinktype id="10001">
                <name>Reference</name>
                                <outwardlinks description="relates to">
                            <issuelink>
            <issuekey id="14266">DBAL-392</issuekey>
        </issuelink>
                    </outwardlinks>
                                            </issuelinktype>
                    </issuelinks>
                <attachments>
                    <attachment id="11352" name="Argument.php" size="1841" author="alex88" created="Thu, 22 Nov 2012 15:26:54 +0000" />
                    <attachment id="11351" name="Post.php" size="2395" author="alex88" created="Thu, 22 Nov 2012 15:26:54 +0000" />
                    <attachment id="11353" name="Post2.php" size="1622" author="alex88" created="Thu, 22 Nov 2012 15:26:54 +0000" />
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>