- changed status to resolved
consistency between @declared_attr and plain column with joined inh
Issue #2565
resolved
the original behavior given to the "column copy" behavior in mixins doesn't match what's become of the @declared_attr use case. these should probably act the same.
class Mixin(object):
a = Column(Integer)
@declared_attr
def b(cls):
return Column(Integer)
class A(Mixin, Base):
__tablename__ = 'a'
id = Column(Integer, primary_key=True)
class B(A):
__tablename__ = 'b'
id = Column(Integer, ForeignKey('a.id'), primary_key=True)
assert 'a' in A.__table__.c
assert 'b' in A.__table__.c
assert 'a' not in B.__table__.c
assert 'b' not in B.__table__.c
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.8.0b1 (automated comment)
- Log in to comment
062f0a202af1185a21b94f33cb7af92cffacfd15