How do I create an entity without primary key?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
17 views
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);


How can I create entity of this table without primary key ID?
by | 17 views

1 Answer

0 like 0 dislike
Around here id-class-with-many-to-one-relation

PS: Please note that You have a many-to-many
by

Related questions

0 like 0 dislike
3 answers
0 like 0 dislike
2 answers
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
35,389 users