Create A Model With Multiple Pk

Hi everybody,

I have a kind of problem creating my model.

My tables:

Project

id

name

Issue

id

projectId

equipmentId

Equipment

id

name

Comment

id

issueId

text

I try to access to my equipment/project through my comment but it’s not working I tried :




<?php

public function relations(){

return array(

 'issue' => array(self::BELONGS_TO,'Issue',array('issueId'=>'id'),

 'equipment' => array(self::BELONGS_TO,'Equipment',array('equipmentId'=>'id'),'through'=>'issue',

 'project' => array(self::BELONGS_TO,'Project',array('projectId'=>'id'),'through'=>'issue',

)

}




Not working ???

Can someone help me please ?

Why it’s not working? Do you got an error message or the data does not show up where you expect it?