Yii-Bootstrap-Editable, Editablecolumn With Compositeprimarykey

Hello,

I am using yii-bootstrap-editable with EditableColumn.

My model has a composite key :

And I had a error at the function (in the file EditableField.php):




 public function getSelector()

    {

       

  return get_class($this->model) . '_' . $this->attribute . ($this->model->PrimaryKey ? '_' . $this->model->PrimaryKey : '_new'); 

       

    }

so I modify the code :




 public function getSelector()

    {

       

        if(is_array($this->model->PrimaryKey)){

            return get_class($this->model) . '_' . $this->attribute . ($this->model->PrimaryKeyFirst ? '_' . $this->model->PrimaryKeyFirst : '_new');

        }else{

           return get_class($this->model) . '_' . $this->attribute . ($this->model->PrimaryKey ? '_' . $this->model->PrimaryKey : '_new'); 

        }

    }



and overwrite activeRecord and add propretie PrimaryKeyFirst

But now, I get a other error, because of my composite primary key:

in the file EditableField.php




 public function renderLink()

    {

       

        echo CHtml::openTag('a', $this->htmlOptions);

        $this->renderText();

        echo CHtml::closeTag('a');

    }



value of $this->htmlOptions :

Maybe it is a bug of Editablecolumn?

My solution for the first problem that I had is not very good.

Nath