- changed status to wontfix
add __clause_element__ to ColumnProperty ?
Issue #2586
resolved
to support a declarative pattern like this:
Base = declarative_base()
class DocumentBase(Base):
__abstract__ = True
filename = Column(String)
@declared_attr
def file_object(cls):
return deferred(Column('file_object', LargeBinary))
@declared_attr
def file_size(cls):
# i.e. this:
return column_property(func.length(cls.file_object))
# and not this:
return column_property(func.length(cls.file_object.columns[0](0)))
class Document(DocumentBase):
__tablename__ = 'document'
id = Column(Integer, primary_key=True)
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.7.10 (automated comment)
- Log in to comment
that code wouldn't even work since it calls upon
file_object()
more than once when declarative runs. I'd rather not add more paths like this for now.