summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/session.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/orm/session.py')
-rw-r--r--lib/sqlalchemy/orm/session.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py
index c98cbe6b3..b2764def4 100644
--- a/lib/sqlalchemy/orm/session.py
+++ b/lib/sqlalchemy/orm/session.py
@@ -1091,13 +1091,13 @@ class Session(object):
self._cascade_save_or_update(state)
def add(self, instance):
- """Add the given instance into this ``Session``.
+ """Place an object in the ``Session``.
- TODO: rephrase the below in user terms; possibly tie into future
- function that downgrades persistent to transient. [ticket:1052]
+ Its state will be persisted to the database on the next flush
+ operation.
- The non-None state `key` on the instance's state determines whether
- to ``save()`` or ``update()`` the instance.
+ Repeated calls to ``add()`` will be ignored. The opposite of ``add()``
+ is ``expunge()``.
"""
state = _state_for_unknown_persistence_instance(instance)