Skip to content

Integrity constraint violation: 1062 Duplicate entry #75

@larsroettig

Description

@larsroettig

Preconditions

  • Create two Sources
  • Assign SKU-1 quantity to Source 1 - 5 quantity and Status in Stock
  • Assign SKU-1 quantity to Source 2 - 5 quantity and Status out of Stock

Steps to reproduce

  • Try Save in the in fixtures or in the backend

Expected result

Can save without error

Actual result

savemultiple_php_-_magento2_-___volumes_webroot_www_magento2_

In the Backend can Status out of Stock not saved.

test___products___inventory___catalog___magento_admin

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'SKU-1' for key 'PRIMARY', query was: INSERT INTO inventory_stock_item_stock_32_replica (sku,quantity,status) VALUES (?, ?, ?), (?, ?, ?)
/Volumes/webroot/www/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php:555

With the following test case, it works fine!

Assign SKU-1 quantity to Source 1 - 5 quantity and Status in Stock
Assign SKU-1 quantity to Source 2 - 5 quantity and Status in Stock

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions