Try our conversational search powered by Generative AI!

Updating catalog content causes unnecessary database roundtrips

Found in

EPiServer.Commerce 10.0.0

Fixed in

EPiServer.Commerce 10.4.1

(Or a related package)

Created

Feb 16, 2017

Updated

Mar 10, 2017

Area

Core

State

Closed, Fixed and tested


Description

When updating and publishing catalog content through IContentRepository, a call is made to update the base data (e.g., the CatalogEntry table) even though there are no changes to this table (only changes to meta fields).

The root cause of this is the naïve, dirty handling of the System.Data classes. As soon as a setter on a DataRow is invoked, the row (and the parent DataTable and DataSet) changes state to modified. The calling code should check if the value needs updating before invoking the setter to avoid changing the state unnecessarily, triggering a save to the database.