Answer the question
In order to leave comments, you need to log in
How can I create an entity without a primary key?
I have a table
CREATE TABLE IF NOT EXISTS user_role (
user_id INT NULL ,
role_id INT NULL ,
CONSTRAINT user_role_user_id_fk
FOREIGN KEY (user_id) REFERENCES user (id),
CONSTRAINT user_role_role_id_fk
FOREIGN KEY (role_id) REFERENCES role (id)
)
ENGINE=InnoDB;
CREATE INDEX user_role_role_id_fk ON user_role (role_id);
CREATE INDEX user_role_user_id_fk ON user_role (user_id);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question