Data reader - error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 Jahre weitere
Hey guys,

Im trying to add a new field to the product object

I have added the field on the database, and updated the nopmodel.edmx, and added the new property on my product object.

when i add a new product from the admin module, it works fine, and i can add a new product with my new field (productowner)


But when nopcommerce calls the neccesary functions to GET the products, i get the following error

[EntityCommandExecutionException: The data reader is incompatible with the specified 'NopSolutions.NopCommerce.BusinessLogic.Data.Product'. A member of the type, 'ProductOwner', does not have a corresponding column in the data reader with the same name.]

I get the error on this code:

            var result = base.ExecuteFunction<Product>("Sp_ProductLoadAllPaged",
                categoryIdParameter, manufacturerIdParameter, productTagIdParameter,
                featuredProductsParameter, priceMinParameter, priceMaxParameter,
                relatedToProductIdParameter, keywordsParameter, searchDescriptionsParameter, showHiddenParameter,
                pageSizeParameter, pageIndexParameter, filteredSpecsParameter,
                languageIdParameter, orderByParameter, totalRecordsParameter).ToList();

----

Can anyone help me, i can understand that teh data reader is incompatible, but how do i expand the data reader so that it contains the new column?
13 Jahre weitere
Ok apparently i jumped the gun on this one,
I had forgotten to add the new field to the store procedure called SP_ProductLoadAllPaged, which maps to NOP_ProductLoadAllPaged.
So it returns a data without my new field which created the error.

Almost done with multivendoring on my site.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.