declarative mixin fails with single table inh + column with different name

Issue #1930 resolved
Mike Bayer repo owner created an issue
    def test_columns_single_table_inheritance(self):
        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):
            __mapper_args__ = {'polymorphic_identity': 'specific'}

Comments (2)

  1. Log in to comment