I'm having a bit of trouble with this snippet from another stackoverflow
question:
http://stackoverflow.com/questions/1623661/sqlalchemy-shallow-copy-avoiding-lazy-loading
The snippet in question:
from sqlalchemy.orm import object_mapper, ColumnProperty,
RelationProperty
newobj =
On Apr 20, 2011, at 5:09 PM, Mahmoud Abdelkader wrote:
for model_property in object_mapper(user).iterate_properties:
if isinstance(model_property, ColumnProperty):
key = model_property.key
dictionary[key] = getattr(user, key)
elif (isinstance(model_property,