Yyp
Schreck

-----Original Message-----
From: Casey Stark <[email protected]>

Date: Fri, 22 May 2009 01:17:42 
To: CakePHP<[email protected]>
Subject: Model Architecture: User Vote History



Hello bakers.

I'm beginning on my second cake project and I need some advice with my
model setup. Here's the deal:

I have several models that users can vote up or down (think like
stackoverflow - how users can vote on both questions and answers), but
I would like to keep track of vote history. Users can vote on
publications, issues, etc., so I figured the rating of each record
would be stored in those respective models, i.e. publications.rating.
At the same time, I need to keep track of the information of the
individual votes (user, which model, id of the record, voted_up,
timestamp, etc.).

The only way I can think of to accomplish this is to have a vote model
with all of these fields. I guess that's fine and all, but there
should be a ton of votes and this table could get huge. I feel like
this is a pretty common task, so I just want to ask if there is any
better convention for this sort of function.

Thanks guys.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to