diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-03-02 11:58:52 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2018-03-02 11:59:11 -0500 |
| commit | ea36338b2e5f621287e9890deeffb6c5f6ff0874 (patch) | |
| tree | 6d464b73c6be2a31a420c7d827ad3af9fd4df5cc /lib/sqlalchemy | |
| parent | a833c9f7012cb8dd31001443eb745819f5e6dcf8 (diff) | |
| download | sqlalchemy-ea36338b2e5f621287e9890deeffb6c5f6ff0874.tar.gz | |
- add some seealsos for the transient object that loads use case
Change-Id: Ibfa79a3721f31806223906cccf4547673b3d42f1
(cherry picked from commit 5de2e17b6e6686adf0a87038e90b001978187c0a)
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/orm/session.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index 13f78317c..9ac529aeb 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -1892,6 +1892,11 @@ class Session(_SessionClassMethods): method. + .. seealso:: + + :func:`.make_transient_to_detached` - provides for an alternative + means of "merging" a single object into the :class:`.Session` + """ if self._warn_on_events: @@ -2152,6 +2157,10 @@ class Session(_SessionClassMethods): allows per-relationship loading of many-to-ones on items that are pending. + :func:`.make_transient_to_detached` - allows for an object to + be added to a :class:`.Session` without SQL emitted, which then + will unexpire attributes on access. + """ state = attributes.instance_state(obj) to_attach = self._before_attach(state, obj) @@ -3051,6 +3060,8 @@ def make_transient_to_detached(instance): :func:`.make_transient` + :meth:`.Session.enable_relationship_loading` + """ state = attributes.instance_state(instance) if state.session_id or state.key: |
