Details
-
Type:
Task
-
Status:
Closed
-
Priority:
Major
-
Resolution: Invalid
-
Affects Version/s: 2.2
-
Fix Version/s: None
-
Component/s: Mapping Drivers
-
Labels:None
Description
It looks like this is in the older documentation (2.0) but not mentioned in the latest.
I need to use ON UPDATE CASCADE in a few cases. Seems odd to support onDelete and not onUpdate. Am I missing something?
I have a third party table which holds users:
CREATE TABLE `user`
(
`user_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
`email` VARCHAR(255) NOT NULL UNIQUE,
) ENGINE=InnoDB CHARSET="utf8";
In my table I want to use natural foreign key, so I reference `email`.
CREATE TABLE `transaction` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
`user_email` VARCHAR(255) NOT NULL,
FOREIGN KEY (`user_email`) REFERENCES `user`(`email`)
);
I would like to RDBMS handle email updates on the foreign records.
That is a real-life use case of the onDelete, which you decided to remove.
Please, get it back if possible.