You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
active_history is not implemetned for composites #9460
near-term releaseaddition to the milestone which indicates this should be in a near-term releaseormregressionsomething worked and was broken by a change
this is not really mainstream public API but the property seems to not be set up
fromsqlalchemyimportColumnfromsqlalchemyimportIntegerfromsqlalchemy.ormimportcompositefromsqlalchemy.ormimportdeclarative_baseBase=declarative_base()
classModel(Base):
__tablename__='model'id=Column(Integer, primary_key=True)
composite=composite(tuple, Column('value_1', Integer), Column('value_2', Integer))
Model.registry.configure()
# this of course should be on the compositeModel.composite.impl.active_history=True
Traceback (most recent call last):
File "/home/classic/dev/sqlalchemy/test3.py", line 15, in <module>
Model.composite.impl.active_history = True
File "/home/classic/dev/sqlalchemy/lib/sqlalchemy/orm/attributes.py", line 925, in _set_active_history
self.dispatch._active_history = value
AttributeError: '_ProxyImpl' object has no attribute 'dispatch'
near-term releaseaddition to the milestone which indicates this should be in a near-term releaseormregressionsomething worked and was broken by a change
Activity
[-]small regression involving impl.active_history[/-][+]active_history is not implemetned for composites[/+]sqla-tester commentedon Mar 9, 2023
Mike Bayer has proposed a fix for this issue in the main branch:
implement active_history for composites https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/4501
implement active_history for composites