public function attach($owner)
{
if (!$owner instanceof ActiveRecord) {
throw new ErrorException(\Yii::t('skeeks/cms', 'Owner must be instance of {yii}', ['yii' => 'yii\\db\\ActiveRecord']));
}
if (count($owner->getTableSchema()->primaryKey) > 1) {
throw new ErrorException(\Yii::t('skeeks/cms', 'RelationalBehavior doesn\'t support composite primary keys'));
}
parent::attach($owner);
}