Saturday, May 2, 2009

1 model for multiple database tables

So I am building a forum system, that will be used for multiple areas.
The table structure is as follows.

posts
posts_teams
posts_groups
topics
topics_teams
topics_groups

For example, all the posts tables are identical, except for the fact
that posts_teams is only teams posts, and posts_groups is only for
groups.

I want to be able to use only ONE model (posts) that can manipulate
all 3 tables. Since they are all the same data and structure, I don't
want to have duplicate a single model 3 times. Is there a method for
this already, or a behavior?

If not I think ill go ahead and develop one.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: