I'd like to inherits from different multi-entities like this:
class FormulaOperand(Operand, TraceLink):
using_options(inheritance='multi')
using_options(tablename='formula_operand')
def getValue(self):
pass
def __repr__(self):
return '<FormulaOperand reference formula %s>' % self.formula
But...oops!
Exception: FormulaOperand entity inherits from several entities, and
this is not supported.
Here comes the problem. It seems that Elixir does not support inherits
in that way?
So I have to choice one to inherit, and another to be has-a
relationship?
How about this:
class FormulaOperand(Operand):
using_options(inheritance='multi')
using_options(tablename='formula_operand')
link = ManyToOne(TraceLink, required=True)
def getValue(self):
pass
def __repr__(self):
return '<FormulaOperand reference formula %s>' % self.formula
So I have to set link manually. Is there any better way to do so?
Thanks.
Victor Lin.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---