Set Composite Key

Hi all,

I want to set a composite primary key for my table. I have added the following in my models-

class Event extends CActiveRecord


public function primaryKey()


return array(‘name’,‘contact’);



But this does not turn out to be helpful.


have you check this :)

yes…Its not working…I have also tried this–

removed the primary key from original table and tried adding in the model…