> 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?
"allowcoloverride" might be what you're looking for: http://elixir.ematia.de/apidocs/elixir.options.html
HTH,
Andreas