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.
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.
Hi,
http://stackoverflow.com/questions/17440876/how-to-add-composite-primary-key-in-yii-framework
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…