<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Mon May 20 03:29:20 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-1628/DDC-1628.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-1628] onUpdate parameter on @JoinColumn not supported</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-1628</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;It looks like this is in the older documentation (2.0) but not mentioned in the latest.&lt;/p&gt;

&lt;p&gt;I need to use ON UPDATE CASCADE in a few cases. Seems odd to support onDelete and not onUpdate. Am I missing something?&lt;/p&gt;</description>
                <environment></environment>
            <key id="13402">DDC-1628</key>
            <summary>onUpdate parameter on @JoinColumn not supported</summary>
                <type id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/task.png">Task</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="6">Invalid</resolution>
                                <assignee username="ocramius">Marco Pivetta</assignee>
                                <reporter username="chrisrichard">Chris Richard</reporter>
                        <labels>
                    </labels>
                <created>Tue, 31 Jan 2012 06:21:34 +0000</created>
                <updated>Wed, 1 May 2013 13:18:11 +0000</updated>
                    <resolved>Thu, 21 Mar 2013 02:51:46 +0000</resolved>
                            <version>2.2</version>
                                                <component>Mapping Drivers</component>
                        <due></due>
                    <votes>3</votes>
                        <watches>5</watches>
                        <comments>
                    <comment id="17359" author="beberlei" created="Tue, 31 Jan 2012 11:44:05 +0000"  >&lt;p&gt;We removed onUpdate because we couldnt come up with a use-case. CAn you share yours?&lt;/p&gt;</comment>
                    <comment id="17536" author="chrisrichard" created="Thu, 8 Mar 2012 00:00:53 +0000"  >&lt;p&gt;I assume it&apos;s just the mysql driver but all the constraints get created such that you cannot change the primary keys (even if it&apos;s not an auto-gen PK). ON UPDATE CASCADE would probably be a better default.&lt;/p&gt;</comment>
                    <comment id="18552" author="darklow" created="Tue, 28 Aug 2012 12:13:51 +0000"  >&lt;p&gt;I really hope onUpdate annotation attribute will be restored.&lt;br/&gt;
I used it in PostgreSQL very often. In some entities in some projects Primary Key ID can be very important its sequence, and if you want to change it, then &quot;ON UPDATE CASCADE&quot; changed it for all the references too. It was must have feature. Now few of my applications are broken with latest doctrine orm.&lt;br/&gt;
Please consider restoring it back.&lt;br/&gt;
Thank you&lt;/p&gt;</comment>
                    <comment id="18821" author="drevolution" created="Thu, 11 Oct 2012 06:43:23 +0000"  >&lt;p&gt;+1 - onUpdate attribute is very useful for PostgreSQL databases, it controls operations with foreign keys.&lt;/p&gt;</comment>
                    <comment id="18963" author="kenkataiwa" created="Sat, 10 Nov 2012 11:18:00 +0000"  >&lt;p&gt;What do you mean, you couldn&apos;t come up with a use-case? If one is migrating data from one table to another and requires that all foreign key references be changed to map the ones in the new table created, before deleting the last table. And there are may more case. Maybe I am missing some thing here, if it&apos;s a use-case for the MySQL and PostgreSQL guys, why would you not support it.&lt;/p&gt;</comment>
                    <comment id="18964" author="ocramius" created="Sat, 10 Nov 2012 14:43:55 +0000"  >&lt;p&gt;&lt;a href=&quot;http://www.doctrine-project.org/jira/secure/ViewProfile.jspa?name=kenkataiwa&quot; class=&quot;user-hover&quot; rel=&quot;kenkataiwa&quot;&gt;Kenneth Kataiwa&lt;/a&gt; updating identifiers is something you don&apos;t do, and I sincerely also don&apos;t have a use case for this, not in the context of an ORM at least. Also, handling changes in your identifiers in the UnitOfWork is a real problem that adds a lot overhead.&lt;/p&gt;</comment>
                    <comment id="18965" author="drevolution" created="Mon, 12 Nov 2012 05:28:13 +0000"  >&lt;p&gt;&lt;cite&gt;+1 - onUpdate attribute is very useful for PostgreSQL databases, it controls operations with foreign keys.&lt;/cite&gt;&lt;/p&gt;

&lt;p&gt;I&apos;m taking my words back. It is not a good idea to define onUpdate on foreign keys. Yes, PostgreSQL supports it but it doesn&apos;t mean that we should use it in ORM.&lt;br/&gt;
Thanks for your time.&lt;/p&gt;</comment>
                    <comment id="19879" author="ocramius" created="Thu, 21 Mar 2013 02:51:46 +0000"  >&lt;p&gt;This issue is invalid, since data migration is not a task for the ORM anyway.&lt;/p&gt;</comment>
                    <comment id="20160" author="garygolden" created="Wed, 1 May 2013 13:18:11 +0000"  >&lt;p&gt;I have a third party table which holds users:&lt;/p&gt;

&lt;p&gt;CREATE TABLE `user`&lt;br/&gt;
(&lt;br/&gt;
    `user_id`       INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,&lt;br/&gt;
    `email`         VARCHAR(255) NOT NULL UNIQUE,&lt;br/&gt;
) ENGINE=InnoDB CHARSET=&quot;utf8&quot;;&lt;/p&gt;

&lt;p&gt;In my table I want to use natural foreign key, so I reference `email`.&lt;/p&gt;

&lt;p&gt;CREATE TABLE `transaction` (&lt;br/&gt;
    `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,&lt;br/&gt;
    `user_email` VARCHAR(255) NOT NULL,&lt;br/&gt;
    FOREIGN KEY (`user_email`) REFERENCES `user`(`email`)&lt;br/&gt;
);&lt;/p&gt;

&lt;p&gt;I would like to RDBMS handle email updates on the foreign records.&lt;/p&gt;

&lt;p&gt;That is a real-life use case of the onDelete, which you decided to remove.&lt;br/&gt;
Please, get it back if possible.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>