Hybris convert Product to VariantProduct

420 views Asked by At

I extract from an WebService several Products which I convert to ProductModel, however, some of these products are "variants". I need to manually convert a ProductModel to VariantProductModel, is there any OOTB way to achieve this ?

1

There are 1 answers

0
Yoni On

You cannot change an object from Type. This is partly because the datatype is tied into the PK of your object.

If you want to change the type, you will need to create a new instance of the variantProductModel, copy all the fields and remove the original product