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 ?
Asked
Active
Viewed 347 times
1 Answers
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