add a hook to allow new Table columns to propagate to derived selectables, at least manually
Issue #2549
resolved
test case:
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class A(Base):
__tablename__ = 'a'
id = Column(Integer, primary_key=True)
class B(A):
__tablename__ = 'b'
id = Column(Integer, ForeignKey('a.id'), primary_key=True)
class C(B):
new_col = Column(Integer)
configure_mappers()
b_join = B.__mapper__.mapped_table
assert b_join.c.b_new_col is B.__table__.c.new_col
assert C.__mapper__.column_attrs['new_col']('new_col').columns[0](0) is B.__table__.c.new_col
Comments (3)
-
reporter -
reporter - changed status to resolved
-
reporter - removed milestone
Removing milestone: 0.8.0b1 (automated comment)
- Log in to comment
tests in sql/test_selectable: