开发者

Get one comment table to serve both apps and posts table?

I've created a table called comments, comments has a property called ItemId which is used as the foreign key for two other tables posts and apps.

This is because i was hoping for the comments table to serve both the apps and posts table. However when trying to insert a value into the comments table开发者_如何转开发 it throws a foreign key constraint error.

Does anyone know the best way of accomplishing what I'm trying to do with the least amount of duplication?


See this question/answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜