[Sqlalchemy-tickets] Issue #4133: configure_mappers does not refresh all_orm_descriptors (zzzeek/sq
Brought to you by:
zzzeek
From: dima-starosud <iss...@bi...> - 2017-11-09 10:42:38
|
New issue 4133: configure_mappers does not refresh all_orm_descriptors https://bitbucket.org/zzzeek/sqlalchemy/issues/4133/configure_mappers-does-not-refresh dima-starosud: This is using sqlalchemy 1.2.0b3. I've faced weird behavior shown in following code snippet. Assertion in that test fails. But if you comment either `#1` or `#2` or both it will pass. ``` #!python Base = declarative_base() class Target(Base): __tablename__ = 'target' id = Column(Integer, primary_key=True) descriptors = lambda: inspect(Target).all_orm_descriptors.keys() # these two calls make test fail configure_mappers() #1 descriptors() #2 Target.value = hybrid_property(lambda _: 'Hello!') configure_mappers() assert 'value' in descriptors() ``` Please let me know if I get it wrong. Thanks a lot in advance! |