Commits

Mike Bayer  committed a0afed3

fix to the column properties to better compile the underlying mapper before access

  • Participants
  • Parent commits 7010ffb

Comments (0)

Files changed (1)

File lib/sqlalchemy/orm/mapper.py

         class LOrderedProp(util.OrderedProperties):
             """this extends OrderedProperties to trigger a compile() before the
             members of the object are accessed."""
-            def __getattr__(s, key):
+            def _get_data(s):
                 self.compile()
-                return util.OrderedProperties.__getattr__(s, key)
+                return s.__dict__['_OrderedProperties__data']
+            _OrderedProperties__data = property(_get_data)
                 
         self.columns = LOrderedProp()
         self.c = self.columns