Re: [sqlalchemy] Concrete inheritance with different hybrid methods

2020-01-08 Thread Damian Yurzola
Thanks Mike. This is good to know. On Tuesday, January 7, 2020 at 5:53:19 PM UTC-8, Mike Bayer wrote: > > to accomplish this you would need to rewrite the > orm.util.polymorphic_union function to include these additional expressions > within each SELECT under a common label name, then override

Re: [sqlalchemy] Concrete inheritance with different hybrid methods

2020-01-07 Thread Mike Bayer
to accomplish this you would need to rewrite the orm.util.polymorphic_union function to include these additional expressions within each SELECT under a common label name, then override the part of AbstractConcreteBase which applies the polymorphic_union in order to accomplish this. These two

[sqlalchemy] Concrete inheritance with different hybrid methods

2020-01-07 Thread Damian Yurzola
Folks I have this toy example I've sanitized. class TableBase(AbstractConcreteBase, Base): pass class TableA(TableBase): __tablename__ = "table_a" __mapper_args__ = { "polymorphic_identity": "A", "concrete": True, } v0 = Column(Integer) @hybrid_property