/**
  * Insert entity attribute value
  *
  * @param \Magento\Framework\DataObject $object
  * @param AbstractAttribute $attribute
  * @param mixed $value
  * @return $this
  */
 protected function _insertAttribute($object, $attribute, $value)
 {
     /**
      * save required attributes in global scope every time if store id different from default
      */
     $storeId = (int) $this->_storeManager->getStore($object->getStoreId())->getId();
     if ($this->getDefaultStoreId() != $storeId) {
         if ($attribute->getIsRequired() || $attribute->getIsRequiredInAdminStore()) {
             $table = $attribute->getBackend()->getTable();
             $select = $this->getConnection()->select()->from($table)->where('attribute_id = ?', $attribute->getAttributeId())->where('store_id = ?', $this->getDefaultStoreId())->where('entity_id = ?', $object->getEntityId());
             $row = $this->getConnection()->fetchOne($select);
             if (!$row) {
                 $data = new \Magento\Framework\DataObject(['attribute_id' => $attribute->getAttributeId(), 'store_id' => $this->getDefaultStoreId(), 'entity_id' => $object->getEntityId(), 'value' => $this->_prepareValueForSave($value, $attribute)]);
                 $bind = $this->_prepareDataForTable($data, $table);
                 $this->getConnection()->insertOnDuplicate($table, $bind, ['value']);
             }
         }
     }
     return $this->_saveAttributeValue($object, $attribute, $value);
 }