This use to work in 1.9 when writing to Nop_ProductPicture.
INSERT
INTO [Nop_ProductPicture]
(
ProductID,
PictureID,
DisplayOrder
)
VALUES
(
?m.nprodid,
?m.npictureid,
?m.nnumberone
)
Since Nop 1.8 I have been writing the picture,product,productvariant data straight to the DB. In 2.10 that has somehow changed. When I try to create a Product_Picture_Mapping entry I get the following error:
The Insert Statement conflicted with the FOREIGN KEY restraint "'ProductPicture_Product.' The conflict occured in table 'NopDemo', table dbo.product, column 'ID.'
here is my statement:
INSERT INTO Product_Picture_Mapping
(
ProductID,
Pictureid,
DisplayOrder
)
VALUES
(
?m.nprodid,
?m.nPictureID,
?m.nnumberone
)
So the code use to work and now it does not. Any Suggestions?
Please tell me what I am doing wrong.
Thanks!
0