summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/exc.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-07-23 12:27:09 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-07-23 12:27:09 -0400
commita3705cd17b647de71ea8adc662f6e6808c37518b (patch)
tree98e824d5befe8b0f3b4fa2d52ff69a6a0a60cb1a /lib/sqlalchemy/orm/exc.py
parentc1295ce57ba7d906821b3ddd5b97aa9659700d52 (diff)
downloadsqlalchemy-a3705cd17b647de71ea8adc662f6e6808c37518b.tar.gz
- document query.get(), ObjectDeletedError fully, [ticket:2146]
Diffstat (limited to 'lib/sqlalchemy/orm/exc.py')
-rw-r--r--lib/sqlalchemy/orm/exc.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/exc.py b/lib/sqlalchemy/orm/exc.py
index 3bfb2708c..1812f0d72 100644
--- a/lib/sqlalchemy/orm/exc.py
+++ b/lib/sqlalchemy/orm/exc.py
@@ -77,7 +77,24 @@ class UnmappedClassError(UnmappedError):
class ObjectDeletedError(sa.exc.InvalidRequestError):
- """An refresh() operation failed to re-retrieve an object's row."""
+ """A refresh operation failed to retrieve the database
+ row corresponding to an object's known primary key identity.
+
+ A refresh operation proceeds when an expired attribute is
+ accessed on an object, or when :meth:`.Query.get` is
+ used to retrieve an object which is, upon retrieval, detected
+ as expired. A SELECT is emitted for the target row
+ based on primary key; if no row is returned, this
+ exception is raised.
+
+ The true meaning of this exception is simply that
+ no row exists for the primary key identifier associated
+ with a persistent object. The row may have been
+ deleted, or in some cases the primary key updated
+ to a new value, outside of the ORM's management of the target
+ object.
+
+ """
class UnmappedColumnError(sa.exc.InvalidRequestError):