diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-07 23:58:17 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-02-07 23:58:17 +0000 |
| commit | 03167fb4bbb2d4a1d68ef04dff02ed2033b4f138 (patch) | |
| tree | 858b2e36b83467b8f4c2a3b72b9e4fc4bd7cadaa /lib/sqlalchemy/orm/exc.py | |
| parent | 52ab4041affc8618892d82d82281eedc5b3d0b6f (diff) | |
| download | sqlalchemy-03167fb4bbb2d4a1d68ef04dff02ed2033b4f138.tar.gz | |
- Now uses sqlalchemy.orm.exc.DetachedInstanceError when an
attribute load or refresh action fails due to object
being detached from any Session. UnboundExecutionError
is specific to engines bound to sessions and statements.
Diffstat (limited to 'lib/sqlalchemy/orm/exc.py')
| -rw-r--r-- | lib/sqlalchemy/orm/exc.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/exc.py b/lib/sqlalchemy/orm/exc.py index 8b52eec8a..431acc15c 100644 --- a/lib/sqlalchemy/orm/exc.py +++ b/lib/sqlalchemy/orm/exc.py @@ -23,7 +23,9 @@ class FlushError(sa.exc.SQLAlchemyError): class UnmappedError(sa.exc.InvalidRequestError): """TODO""" - +class DetachedInstanceError(sa.exc.SQLAlchemyError): + """An attempt to access unloaded attributes on a mapped instance that is detached.""" + class UnmappedInstanceError(UnmappedError): """An mapping operation was requested for an unknown instance.""" |
