declarative mixin fails with joined table inh + renamed column

Issue #1931 resolved
Michael Bayer
repo owner created an issue

the same as #1930 but for joined. Declarative would need different rules to handle this.

        class MyMixin(object):
            foo = Column('foo', Integer)
            bar = Column('bar_newname', Integer)

        class General(Base, MyMixin):
            __tablename__ = 'test'
            id = Column(Integer, primary_key=True)
            type_ = Column(String(50))
            __mapper__args = {'polymorphic_on': type_}

        class Specific(General):
            __tablename__ = 'sub'
            id = Column(Integer, ForeignKey(''), primary_key=True)
            __mapper_args__ = {'polymorphic_identity': 'specific'}

Comments (3)

  1. Log in to comment