0

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 ?

Nexussim Lements
  • 535
  • 1
  • 15
  • 47

1 Answers1

0

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

Yoni
  • 1,370
  • 7
  • 17