summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/session.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-12-15 20:06:27 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-12-15 20:06:27 -0500
commit638c1c46b23273e3c50638537ecfec91e839253e (patch)
tree886c3defaf21f6017caeb8a06d9db3e6b40b13f8 /lib/sqlalchemy/orm/session.py
parent752359936645a6308beb52e77dbdbfad9929a301 (diff)
downloadsqlalchemy-638c1c46b23273e3c50638537ecfec91e839253e.tar.gz
load_on_pending is different from enable_relationship_loading and should
not be superseded. both have a potential use.
Diffstat (limited to 'lib/sqlalchemy/orm/session.py')
-rw-r--r--lib/sqlalchemy/orm/session.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py
index b3720c94e..0c3bc5cbe 100644
--- a/lib/sqlalchemy/orm/session.py
+++ b/lib/sqlalchemy/orm/session.py
@@ -1758,8 +1758,8 @@ class Session(_SessionClassMethods):
may not fire off a backref event, if the effective value
is what was already loaded from a foreign-key-holding value.
- The :meth:`.Session.enable_relationship_loading` method supersedes
- the ``load_on_pending`` flag on :func:`.relationship`. Unlike
+ The :meth:`.Session.enable_relationship_loading` method is
+ similar to the ``load_on_pending`` flag on :func:`.relationship`. Unlike
that flag, :meth:`.Session.enable_relationship_loading` allows
an object to remain transient while still being able to load
related items.
@@ -1776,6 +1776,12 @@ class Session(_SessionClassMethods):
.. versionadded:: 0.8
+ .. seealso::
+
+ ``load_on_pending`` at :func:`.relationship` - this flag
+ allows per-relationship loading of many-to-ones on items that
+ are pending.
+
"""
state = attributes.instance_state(obj)
self._attach(state, include_before=True)