diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2019-01-26 22:21:46 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2019-01-26 22:21:46 +0000 |
| commit | a4e01bad939de39d1de471b70d0d0a6f72da34ab (patch) | |
| tree | 8a94021d5045fee01116d7d23e1bf18ec4e3a96f /lib/sqlalchemy | |
| parent | d3227c09f113837ba852dfdb76f5e8a19251d821 (diff) | |
| parent | 29e033f496c28e4d7b9a5bfc46096711f0aa5571 (diff) | |
| download | sqlalchemy-a4e01bad939de39d1de471b70d0d0a6f72da34ab.tar.gz | |
Merge "Ensure of_type subclass taken into account with wildcards"
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/orm/strategy_options.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/strategy_options.py b/lib/sqlalchemy/orm/strategy_options.py index 19c81860e..ee3b83caa 100644 --- a/lib/sqlalchemy/orm/strategy_options.py +++ b/lib/sqlalchemy/orm/strategy_options.py @@ -203,6 +203,13 @@ class Load(Generative, MapperOption): self.propagate_to_loaders = False if wildcard_key: attr = "%s:%s" % (wildcard_key, attr) + + # TODO: AliasedInsp inside the path for of_type is not + # working for a with_polymorphic entity because the + # relationship loaders don't render the with_poly into the + # path. See #4469 which will try to improve this + if existing_of_type and not existing_of_type.is_aliased_class: + path = path.parent[existing_of_type] path = path.token(attr) self.path = path return path @@ -706,7 +713,6 @@ class _UnboundLoad(Load): if not loader.is_class_strategy: for idx, token in enumerate(start_path): - if not loader._generate_path( loader.path, token, |
