]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Modified the docstring for Session.add() with lots of help.
authorMichael Trier <mtrier@gmail.com>
Wed, 3 Dec 2008 04:52:55 +0000 (04:52 +0000)
committerMichael Trier <mtrier@gmail.com>
Wed, 3 Dec 2008 04:52:55 +0000 (04:52 +0000)
lib/sqlalchemy/orm/session.py

index c98cbe6b365f19aab0258d9f34de4f68c33293c5..b2764def467e77f885530b0d29247fdd6c29cbf4 100644 (file)
@@ -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)