INSERT statement conflicted with the FOREIGN KEY constraint FK_merchItemCacheItem_merchItemCache
Hi all,
I'm wondering has anyone seen this error before? It's been logged a couple of times over the past few days. I'm not familiar with the Merchello table structure to know why this might occur. If anyone can give guidance that would be great.
The INSERT statement conflicted with the FOREIGN KEY constraint "FKmerchItemCacheItemmerchItemCache". The conflict occurred in database "xxxxxx", table "dbo.merchItemCache", column 'pk'.
I'm assuming this occurs in your application either in a basket or checkout process ...
You can think of the ItemCache as the container for a bunch of line items (ItemCacheLineItems). What must be happening is the ItemCache is getting removed in the database and something in your application is trying to insert a line item referencing the parent container that has been removed.
I'd need to know more about your application to figure out exactly what is going on - but one thought is if you are converting an anonymous customer to a known customer and not migrating their basket or something ... you might see a conflict like this ...
INSERT statement conflicted with the FOREIGN KEY constraint FK_merchItemCacheItem_merchItemCache
Hi all,
I'm wondering has anyone seen this error before? It's been logged a couple of times over the past few days. I'm not familiar with the Merchello table structure to know why this might occur. If anyone can give guidance that would be great.
The INSERT statement conflicted with the FOREIGN KEY constraint "FKmerchItemCacheItemmerchItemCache". The conflict occurred in database "xxxxxx", table "dbo.merchItemCache", column 'pk'.
Alan
Hey Simon,
I'm assuming this occurs in your application either in a basket or checkout process ...
You can think of the
ItemCache
as the container for a bunch of line items (ItemCacheLineItems
). What must be happening is the ItemCache is getting removed in the database and something in your application is trying to insert a line item referencing the parent container that has been removed.I'd need to know more about your application to figure out exactly what is going on - but one thought is if you are converting an anonymous customer to a known customer and not migrating their basket or something ... you might see a conflict like this ...
Thanks for the reply Rusty,
Will look into the anon customer migration angle.
Appreciate it.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.