- changed status to resolved
add 'defer()' function
Issue #802
resolved
as described on the dev list:
http://groups.google.com/group/sqlalchemy-devel/browse_thread/thread/c76e639d74d204de
# defer an attribute
defer(instance, 'someattribute')
# defer multiple attributes
defer(instance, 'someattr', 'someattr2')
# works for column() and relation() attributes !
# bonus: add autodefer option to relation().
# attaches an event handler to foo.bar_id (or whatever
# is in foreign_keys) which defer the attribute.
mapper(Foo, foo, properties={
'bar':relation(Bar, autodefer=True)
})
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.4.xx (automated comment)
- Log in to comment
implemented as
session.expire(instance, ['y', 'z']('x',))
andsession.refresh(instance, ['y', 'z']('x',))
in 622a26a6551a3580c844b634519ab963c7f35aaf