From f2eb4aac9517a3775411c2ecf0f588ffd0d790f6 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 10 Nov 2016 14:24:48 -0500 Subject: Use configured props for mapper.attrs, mapper.all_orm_descriptors Fixed bug where the :attr:`.Mapper.attrs`, :attr:`.Mapper.all_orm_descriptors` and other derived attributes would fail to refresh when mapper properties or other ORM constructs were added to the mapper/class after these accessors were first called. (also trying different ways to get the changelog to merge cleanly) Change-Id: Iaecdb4b3d8c3a3b44302a5880476e60a1f4e27d9 Fixes: #3778 --- lib/sqlalchemy/orm/mapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/orm') diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index 87f2a24b0..5156e432c 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -2111,7 +2111,7 @@ class Mapper(InspectionAttr): continue yield c - @util.memoized_property + @_memoized_configured_property def attrs(self): """A namespace of all :class:`.MapperProperty` objects associated this mapper. @@ -2149,7 +2149,7 @@ class Mapper(InspectionAttr): configure_mappers() return util.ImmutableProperties(self._props) - @util.memoized_property + @_memoized_configured_property def all_orm_descriptors(self): """A namespace of all :class:`.InspectionAttr` attributes associated with the mapped class. -- cgit v1.2.1