DavidW
DavidW

Reputation: 5129

Can I use two related objects as composite key in Doctrine bundled with Symfony2?

Object is ArticleVote and it has two related objects: User and Article. This creates user_id and article_id columns in ArticleVote table. Can I go without using "id" as an id of the table and use a composite key that consists of unique combinaiton of user_id and article_id in ArticleVote talble?

Also, is this supported in Doctrine bundled with Symfony2?

Thanks.

Upvotes: 0

Views: 1033

Answers (1)

Related Questions