我遇到了使用hybrid_property
配置映射器模型的问题
如何正确配置hybrid_property
?
class FooTable:
__tablename__ = 'foo'
name_translations = Column(JSONB, nullable=False)
name = hybrid_property(...)
class Foo:
def __init__(self, name_translations):
self.name_translations = name_translations
# columns = [name_translations]
attributes = tuple(columns) + FooTable.__table_args__
table = Table(FooTable.__tablename__, metadata, *attributes)
mapper(Foo, table, properties=**HOW???**)
感谢您的帮助。