I posted a problem I had yesterday and now thats its solved I began to question my DB structure. What I have: Users, Comments, Votes A user can enter a comment to the system and other users can vote if the like or dislike the comment.
Initially I created 3 tables, 3 views, 3 models and 3 controllers. But now I read the hasAndBelongsToMany section I undestand that my votes table is actually a join table that needs to be called users_comments, and that I should specify the hasAndBelongsToMany array in both models and discard the Votes MVC. All that sounds nice but while a comment belongs to many users who voted for it, it also belongs to only 1 user who entered it. Since I'm new to this I'm asking will that cause me problems in the future and maybe I should model the DB differently. Your input will be very much welcome... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
