Hi all!
I'm sorry if the answer to this situation was already given here, or
in the FAQ - I could not find it.
I've got this model set up:
class Document(EntityBase):
__metaclass__ = EntityMeta
doc_number = Field(Unicode(5),index=True)
class Order(Document):
pass
class Invoice(Document):
doc_number = Field(Unicode(10),index=True) #this type of
documents needs a longer number field
The result is:
"File "C:\Python27\Lib\site-packages\elixir-0.7.1-py2.7.egg\elixir
\entity.py", line 493, in add_column
(col.key, self.entity.__name__))
Exception: Column 'doc_number' already exist in 'Invoice' ! "
I know I could move 'doc_number' from inside the Document() and into
the Invoice() (and into Order() and so on...), but that kinda defeats
the encapsulation idea - Document() contains some common
functionality, that relies on 'doc_number' being present. Is there a
way around 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.