At admin backend, save product was giving SQL errors like :
SQLSTATE: Integrity constraint violation: 1062 Duplicate entry '1161-1' for key 'UNQ_CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID', query was: INSERT INTO
is_decimal_divided) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, '2016-01-06 15:56:50', ?, ?, ?, ?, ?, ?)
Error cames every first attempt to save, after giving error (SQL above) it gets saved in the second attempt, means I had to enter all the product detail again and second time it works.
It was fixed by changing
Is it the right way to replace
but now it does not updates the stock detail [Quantity / in Stock], rest I can add new product, everything works but not the stock options.
Any hint will be helpful.