YiiBooster icon indicating copy to clipboard operation
YiiBooster copied to clipboard

TbRelationalColumn: getPrimaryKey($data)

Open mohammad-eghlima opened this issue 6 years ago • 0 comments

Hi,

We have custom Yii1 and Doctrine2 framework. We use Doctrine instead of Yii Active record. We have our own DataProvider extended from \CDataProvider. You ignored checking this base abstract class and so id will return as null, If you could change your code (for example add the below code before return null), it will be appreciated.

if ($this->grid->dataProvider instanceof CDataProvider) { return $data->getId(); }

mohammad-eghlima avatar Jan 20 '18 10:01 mohammad-eghlima