diff --git a/Entities/Model/ResourceModel/Entities.php b/Entities/Model/ResourceModel/Entities.php index 8afcf6d..eb3e9af 100644 --- a/Entities/Model/ResourceModel/Entities.php +++ b/Entities/Model/ResourceModel/Entities.php @@ -152,7 +152,7 @@ public function createTable($fields, $tableName) 'Is New' ); - $table->setOption('type', 'MYISAM'); + $table->setOption('type', 'INNODB'); $connection->createTable($table); @@ -375,7 +375,7 @@ public function matchEntity($tableName, $pimKey, $entityTable, $entityKey, $impo public function setValues($tableName, $entityTable, $values, $entityTypeId, $storeId, $mode = 1) { $connection = $this->getConnection(); - + foreach ($values as $code => $value) { if (($attribute = $this->getAttribute($code, $entityTypeId))) { if ($attribute['backend_type'] !== 'static') { @@ -471,7 +471,7 @@ public function getAttribute($code, $entityTypeId) ->where('attribute_code = ?', $code) ->limit(1) ); - return count($attribute) ? $attribute : false; + return is_array($attribute) ? count($attribute) ? $attribute : false : false ; } /** @@ -503,4 +503,4 @@ public function getColumnIdentifier($table, $identifier = 'entity_id') return $identifier; } -} \ No newline at end of file +}