I have a few models which are not in the default cakephp format
user(id, name....)
1 Harsha ...
2 John ....
dishes(id, name, price ...)
1 "Cheese Pizza" 6
2 "Zinger Burger" 3
restaurants (id, name, .....)
1 "KFC" ...
2 "Pizza Hut" ...
module(id, name) values (User, Dishes, Restaurants)
1 "Users"
2 "Dishes"
3 "Restaurant"
items (id, module_id, item_id)
1 1 1 (refers to User Harsha)
2 3 2 (refers to Pizza hut)
3 2 2 (refers to Zinger Burger)
4 1 2 (refers to User John)
where item_id refers to the Id of Users, Dishes or Rests Depending on the module_id
reviews (id, parent_id, review, time, item_id, commenter_id)
1 0 "Best Burger in the world" "time" 3 1 (refers to Harsha reviewing Zinger Burger)
2 1 "Yes i love Zingers tooo" time 3 2 ( refers to John replying to Harsha's Review)
I am a little messged up on how to draw up the relationships in cakephp