diff options
| author | Michael Trier <mtrier@gmail.com> | 2008-12-03 04:52:55 +0000 |
|---|---|---|
| committer | Michael Trier <mtrier@gmail.com> | 2008-12-03 04:52:55 +0000 |
| commit | 55a6edef96086f5a23865d81cd7d9ca96209967c (patch) | |
| tree | ec4f925a098d83bf2aa7d601e43c50ea52015c3b /lib/sqlalchemy | |
| parent | 20b202e2209d2ae62db777f13c13778a90e3af4a (diff) | |
| download | sqlalchemy-55a6edef96086f5a23865d81cd7d9ca96209967c.tar.gz | |
Modified the docstring for Session.add() with lots of help.
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/orm/session.py | 10 |
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) |
