I have the following classes
class ParentDocument(Document):
.
.
.
class Child1Document(ParentDocument):
.
.
.
class Child2Document(ParentDocument):
.
.
.
Now let's say that I have a document of type Child1Document. Is it possible to clone it to a new document of type Child2Document?
I have tried to do:
doc1 = Child1Document()
doc1.attr1 = foo
doc1.save()
doc2 = Child2Document()
doc2 = doc1
but this converts doc2 to a Child1Document type. Is there a way to copy all the contents of doc1 to doc2 without converting doc2?