I think you could also use behaviors - put all the common functions
into the behavior and then set each of the model classes to
"behave". :)
See more http://book.cakephp.org/view/88/Behaviors
On Jun 21, 11:47 pm, Miles J wrote:
> I thought of an idea if I use multiple tables. I can create my ba
I thought of an idea if I use multiple tables. I can create my base
model class of Comment. And then I can have the other tables extend
that class to inherit their functions and that should work.
class CommentsArticle extends Comment {}
--~--~-~--~~~---~--~~
You re
I'm using just one table:
comments with fields:
id, model, model_id...
Post hasMany Comment conditions=>array('Comment.model'=>'Post')
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to thi
The only thing thats making me go against multiple tables, is I have
to duplicate the comments model each time I add more.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send e
I think three table will be better. It will be more clear and obvious if
there are relationships between comment and article or comment and photo.
Actually, the cost of read or write database is the same.
On Sun, Jun 21, 2009 at 9:05 AM, Miles J wrote:
>
> Currently on GameSync, I have a comment