I have 'problem' in my Wamp, more precisely in the latest version (Wampserver 3.0.6 64 bit x64).
When I create 2 tables, example:
CREATE TABLE categoria(
id_categoria INT NOT NULL AUTO_INCREMENT,
nome VARCHAR(100) NOT NULL,
PRIMARY KEY(id_categoria)
);
CREATE TABLE chamado(
id_chamado INT NOT NULL AUTO_INCREMENT,
id_categoria INT NOT NULL,
titulo VARCHAR(45) NOT NULL,
PRIMARY KEY(id_chamado),
FOREIGN KEY(id_categoria) REFERENCES categoria(id_categoria)
);
I run and create the tables, however, PhpMyAdmin does not automatically create the relationship between the foreign key and the primary key of the other table, which works with XAMP automatically.
I need to automatically create the relationship between the tables, so that I can use Mysql with Hibernete (it happens with Hibernete too).
I think it might be some configuration, would anyone know how to solve it?
Thank you in advance.----------- > Update:
CalledTable:
InsertintableCalledthroughPHPMyAdmin:
As long as the category table has records, I can add any id in the foreign key of the called table that no error occurs. Things that, using Xamp, works, which lists the two tables and opens an option with the id of the foreign key at the time of the insert.