Doubts about post and comment tables

23 views
Skip to first unread message

SAI RAM SANDEEP Adireddi

unread,
Oct 5, 2015, 2:35:15 PM10/5/15
to web2py-users
Sir, is there a other way to link comments to a particular post without using post.id or any Field of post table has reference post Field in comment table

Leonel Câmara

unread,
Oct 5, 2015, 2:50:05 PM10/5/15
to web2py-users
Yes, there is, if you don't want to reference posts in the comment table nor do you want to have comments referenced in the posts table, you can have yet another table that has both posts and comments and you use that table to know which comments a post has.  
  
Although this normally is not needed unless you want some comments to belong to more than one post.

Why? What are you trying to do?
Reply all
Reply to author
Forward
0 new messages