Cakephp Containable or Tree?

Sinker

New Member
I have a db with the following tables\[code\]user(id, name....)restaurant(id, name...)module (id, name )status_messages(id, pid, message, module_id, ModuleID)\[/code\]Module Refers to either Users or Restaurant.Both Users and Restaurants can have status_messages. When a user (id=21) sets a status message \[code\](1, 1, 'Message', 1, 21)\[/code\]When a Restaurant (id=3) sets a status message\[code\](2,2, 'Message', 2, 3)\[/code\]pid = is the self id or parent id for the replies.Which is the best way to pull out the status message and its replies of a user or a restaurant and display it.Will i be able to pull it out?
 
Back
Top