* Port SABase to SQLAlchemy-0.4.

This commit is contained in:
Toshio Kuratomi 2008-02-27 14:32:09 -08:00
parent 6b194125b1
commit f7e80864e5

View file

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