cancel
Showing results for 
Search instead for 
Did you mean: 

there is no LocaleProvider for (detached) model de.hybris.platform.servicelayer.model

Former Member
0 Kudos

I want to load Products using productModel objects. When I am calling ModelService 's saveAll method, it is giving me error like this.....

there is no LocaleProvider for (detached) model de.hybris.platform.servicelayer.model

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

use modelService.attach(object) to attach your object

0 Kudos

Hi Brendon,

We are working on OCC implementation in our application. We are facing similar issue when we are using the web service for export products. "/{baseSiteId}/export/products" this is the mapping at ExportController level. We are getting results in the object, but we are getting above error when we are mapping the Product Data to Product DTO as "there is no LocaleProvider for (detached) model de.hybris.platform.servicelayer.model.ItemModelContextImpl@47cc8a5b".

Thanks.

Former Member
0 Kudos

When creating a new Model you should use ModelService.create(ProductModel.class) to ensure the Model is correctly initialized. If the item has already been saved in the database then the Model will be correctly initialized when retrieving with a flexible search..