Error when adding group from classification store in object

Hi,

I’m trying to make a script where i make a classification store and import lot of products & variants from a csv.

It works, the groups are displayed in the products but I have the following warning wich slow down the script.

```WARNING [cache] Not saving cs_groupconfig_295 to cache as there’s an active write lock [“key” => “cs_groupconfig_295”] ``

My code is really simple for this :
$newVariant->getAttribut()->setActiveGroups($activeGroups);

Hi,
this warning should not be a problem. Cache has write-lock because you modifying an object, so the entries are saved to the cache on next request.

BR
Christian

Okay, thanks for the answer.

And how can I set the storeId in my Product class via code?

I think I need to replace `'storeId' => '1' in definition_Product.php but I do not know how to do it cleanly.

Hi,
hmm, why would you want to change the storeId during runtime? Not sure what side effects that will have.
I guess the best way would be to update definition_Product.php and then run pimcore:deployment:classes-rebuild command.

BR
Christian

I am currently looking at what are the possibilities of pimcore and how much it is possible to ‘automate’ the import of products.

My command creates the classification store, the keys, groups and collections and then imports all the products and binds the attributes that I previously stored in an object.

But I guess that this is not the right approach, it is better to create the store before launching the command.