summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/attributes.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-03-21 17:26:24 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2020-03-22 11:47:59 -0400
commitbecab22dcbe9d68b0671a9246e022c9810f7e319 (patch)
treee9dee7d56ca0509ee08ffde195eb2f0791e9f158 /lib/sqlalchemy/orm/attributes.py
parenta25e2e02e108551d2910171202fd91fdaeb8162c (diff)
downloadsqlalchemy-becab22dcbe9d68b0671a9246e022c9810f7e319.tar.gz
Test instance for matching class hierarchy on get_from_identity
Fixed issue where a lazyload that uses session-local "get" against a target many-to-one relationship where an object with the correct primary key is present, however it's an instance of a sibling class, does not correctly return None as is the case when the lazy loader actually emits a load for that row. Fixes: #5210 Change-Id: I89f9946cfeba61d89a272435f76a5a082b1da30c
Diffstat (limited to 'lib/sqlalchemy/orm/attributes.py')
-rw-r--r--lib/sqlalchemy/orm/attributes.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/attributes.py b/lib/sqlalchemy/orm/attributes.py
index a959b0a40..5ca2858e9 100644
--- a/lib/sqlalchemy/orm/attributes.py
+++ b/lib/sqlalchemy/orm/attributes.py
@@ -34,6 +34,7 @@ from .base import NO_CHANGE # noqa
from .base import NO_RAISE
from .base import NO_VALUE
from .base import NON_PERSISTENT_OK # noqa
+from .base import PASSIVE_CLASS_MISMATCH # noqa
from .base import PASSIVE_NO_FETCH
from .base import PASSIVE_NO_FETCH_RELATED # noqa
from .base import PASSIVE_NO_INITIALIZE