Hi, I want to merge two Entities into one. Is it possible to achieve
this?
For example, assume I have a entity:
class A(Entity):
name = Field(String(255))
But I want to dynamically merge A with B and assign it back to A like
this:
def dynamically_merge(A):
class B(Entity):
age = Field(Integer)
class C(Entity):
pass
C.name = A.name
C.age = B.age
return C
A = dynamically_merge(A)
setup_all()
Of course this doesn't work, so is there any way to achieve this?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---