Sitecore Commerce 8.1 - Column "XXX" referenced in Orders storage mapping file has different precision than the corresponding entry in the SQL schema.
While working with Sitecore Commerce 8.1, it might come to a point where you need to customize the default database schema of Commerce Server to adapt with the business requirements.
For example, a requirement from business to change the length of the ProductVariantId column in the table dbo.LineItems from transactions database to a suitable length like 255 characters:
If you simply update the database schema and run the Storefront, you will hit this kind of error:
Sitecore Commerce 8.1 - Column "XXX" referenced in Orders storage mapping file has different precision than the corresponding entry in the SQL schema.
The reason is, in order for the Storefront and the Commerce Server to understand each other, there must be some kind of contract/mapping that both agree on. That mapping is defined in the file OrderObjectMappings.xml located in the Storefront root folder.
To fix this error, locate the file and change the value in the column ProductVariantId to 255 as well:
Refresh the Storefront and the error above is gone. For any other similar errors related to "Orders storage mapping file", look for the differences between the OrderObjectMappings.xml and the database schema.
Happy Sitecoring!
For example, a requirement from business to change the length of the ProductVariantId column in the table dbo.LineItems from transactions database to a suitable length like 255 characters:
Sitecore Commerce 8.1 - Column "XXX" referenced in Orders storage mapping file has different precision than the corresponding entry in the SQL schema.
The reason is, in order for the Storefront and the Commerce Server to understand each other, there must be some kind of contract/mapping that both agree on. That mapping is defined in the file OrderObjectMappings.xml located in the Storefront root folder.
To fix this error, locate the file and change the value in the column ProductVariantId to 255 as well:
Refresh the Storefront and the error above is gone. For any other similar errors related to "Orders storage mapping file", look for the differences between the OrderObjectMappings.xml and the database schema.
Happy Sitecoring!
Comments
Post a Comment