Saturday, 7 September 2013

In Relation View, why is it giving me an error, when I am trying to create a foreign key?

In Relation View, why is it giving me an error, when I am trying to create
a foreign key?

For my table, I have properly selected the indexes for some of my
attributes that I want (4 foreign keys/indexes). Then when I click on
Relation View, why is it when I click down to choose the right attribute
('edas'.'vehicle'.'owner') and choose a type for 'ON DELETE' and 'ON
UPDATE' 2 out of 4 index/attributes are coming out with an error?
And it does not explain what type of error it is, it's simply just saying
error. This is really confusing, can anyone help?
Below shows what one of the error's is coming out as:
Error
ALTER TABLE `vehicle`
ADD FOREIGN KEY ( `ownerID` )
REFERENCES `edas`.`vehicle` ( `modelID`)
ON DELETE RESTRICT
ON UPDATE RESTRICT;

No comments:

Post a Comment