This question is locked. New answers and comments are not allowed.
Hello,
I have 2 tables, test 1 and test2 in MySql.
Table test2 has a field LinkedTest1 that points to table test1, with a foreign key
When i try this, no problem in ORM.
Now, let's change test1 to testers.test1... oops... no foreign keys are created...
What to do now...
I have 2 tables, test 1 and test2 in MySql.
Table test2 has a field LinkedTest1 that points to table test1, with a foreign key
When i try this, no problem in ORM.
Now, let's change test1 to testers.test1... oops... no foreign keys are created...
What to do now...
CREATE
TABLE
`testers.test1` (
`idtest1`
int
(11)
NOT
NULL
AUTO_INCREMENT,
`bla`
varchar
(45)
DEFAULT
NULL
,
PRIMARY
KEY
(`idtest1`)
) ENGINE=InnoDB
DEFAULT
CHARSET=latin1$$
CREATE
TABLE
`test2` (
`idtest2`
int
(11)
NOT
NULL
AUTO_INCREMENT,
`Boe`
varchar
(45)
DEFAULT
NULL
,
`LinkedTest1`
int
(11)
DEFAULT
NULL
,
PRIMARY
KEY
(`idtest2`),
KEY
`fkLinkedTest1` (`LinkedTest1`),
CONSTRAINT
`fk_test2_LinkedTest1`
FOREIGN
KEY
(`LinkedTest1`)
REFERENCES
`testers.test1` (`idtest1`)
ON
DELETE
NO
ACTION
ON
UPDATE
NO
ACTION
) ENGINE=InnoDB
DEFAULT
CHARSET=latin1$$