Re: Best way to setup my comments system

2009-06-23 Thread jimbo
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

Re: Best way to setup my comments system

2009-06-21 Thread Miles J
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

Re: Best way to setup my comments system

2009-06-21 Thread majna
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

Re: Best way to setup my comments system

2009-06-20 Thread Miles J
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

Re: Best way to setup my comments system

2009-06-20 Thread joshua
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