I have a Project table containing two fields resource1 and resource2. Each resource_id could map to either tool table or people table. What's the relationship?
class Project extends AppModel { var $name = 'Project'; var $belongsTo = array( 'resource1' => array( 'className' => 'Tool' OR 'People', 'foreignKey' => 'resource1_id' ), 'resource2' => array( 'className' => 'Tool' OR 'People', 'foreignKey' => 'resource2_id' ) ); } --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---