So I have a parent entity Producer
and its child ProducerNS
.
ProducerNS
inherited all the properties of Producer
and an additional field, lets call that anyColumn
I have an object Producer and I want to copy over the object into ProducerNS like so,
Producer producer = getproducer();
ProducerNS producerns = producer;
producerns.anyColumn = 'hellobunnies';
However, I know the above syntax is incorrect. Can I transfer over all the properties without doing so individually? (Producer has a lot of fields) If so, how?