diff --git a/fas/fas/json.py b/fas/fas/json.py index 54531fa..beae9f4 100644 --- a/fas/fas/json.py +++ b/fas/fas/json.py @@ -77,10 +77,10 @@ class SABase(object): # pylint: enable-msg=E1101 # Load all the columns from the table - for key in self.mapper.props.keys(): # pylint: disable-msg=E1101 - if isinstance(self.mapper.props[key], # pylint: disable-msg=E1101 - sqlalchemy.orm.properties.ColumnProperty): - props[key] = getattr(self, key) + for column in sqlalchemy.orm.object_mapper(self).iterate_properties: + if isinstance(column, sqlalchemy.orm.properties.ColumnProperty): + props[column.key] = getattr(self, key) + # Load things that are explicitly listed for field in propList: props[field] = getattr(self, field)