You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When $manualInputPrice is already existing (loaded from ProductManualInputPriceRepository and not null), it is currently being persisted in the refresh() method of the ProductManualInputPriceFacade class. This may lead to unnecessary persistence and database updates.
Expected behavior
The $manualInputPrice should not be persisted when it is already existing, and only new instances of $manualInputPrice should be persisted.
Steps to reproduce
The issue can be found in the following code snippet from the ProductManualInputPriceFacade class:
Only persist the $manualInputPrice when it is newly created, i.e., when it is not loaded from the repository. Update the refresh() method to persist $manualInputPrice only when it is null.
The text was updated successfully, but these errors were encountered:
Describe the bug
When
$manualInputPrice
is already existing (loaded fromProductManualInputPriceRepository
and not null), it is currently being persisted in therefresh()
method of theProductManualInputPriceFacade
class. This may lead to unnecessary persistence and database updates.Expected behavior
The
$manualInputPrice
should not be persisted when it is already existing, and only new instances of$manualInputPrice
should be persisted.Steps to reproduce
The issue can be found in the following code snippet from the
ProductManualInputPriceFacade
class:https://github.com/shopsys/shopsys/blob/master/packages/framework/src/Model/Product/Pricing/ProductManualInputPriceFacade.php#L47-L58
Possible solution
Only persist the
$manualInputPrice
when it is newly created, i.e., when it is not loaded from the repository. Update therefresh()
method to persist$manualInputPrice
only when it is null.The text was updated successfully, but these errors were encountered: