Hi,
I'm new to nop & entity. after many search, I figured out how to add a new table/store procedure to nop 1.9, thanks to the post at
https://www.nopcommerce.com/boards/t/6968/i-need-help-in-adding-extra-product-fields-in-database.aspx?p=3
however, I'm having a problem now that seems I could not find a solution.
I need add a new table, say nop_Customization which includes these 2 fields:
customizationId, PK
productId
.....
productId is a foreign key pointing from product table. each product could have multiple customizations.
I added the table to edmx, created the class, created the interface for customizationService, created the class for it, .... again, just follow the https://www.nopcommerce.com/boards/t/6968/i-need-help-in-adding-extra-product-fields-in-database.aspx?p=3 ,
if the table does not have the FK pointing to product table, then it works fine. I can use the customerService fine. but once I added the FK, it created error:
=======================================
Schema specified is not valid. Errors:
The relationship 'NopSolutions.NopCommerce.BusinessLogic.Data.FK_Nop_ProductVariant_Nop_Product1' was not loaded because the type 'NopSolutions.NopCommerce.BusinessLogic.Data.Product' is not available.
The following information may be useful in resolving the previous error:
The required property 'nop_Customization' does not exist on the type 'NopSolutions.NopCommerce.BusinessLogic.Products.Product'.
=======================================
anyone knows how to fix this? it seems I missed a step because of the FK.
thanks.
reader