* Port SABase to SQLAlchemy-0.4.
This commit is contained in:
parent
6b194125b1
commit
f7e80864e5
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue