diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2020-06-01 20:03:28 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2020-06-01 20:03:28 +0000 |
| commit | 03c4166fa852d20b1bc1f4693e70a13725a3ba2e (patch) | |
| tree | 4d2fe6fef7e7999ee6a0ae4017907cca9c4a294c /lib/sqlalchemy/sql/util.py | |
| parent | 1287853bf59a3e50b0a518d4410ff60305058131 (diff) | |
| parent | 4ecd352a9fbb9dbac7b428fe0f098f665c1f0cb1 (diff) | |
| download | sqlalchemy-03c4166fa852d20b1bc1f4693e70a13725a3ba2e.tar.gz | |
Merge "Improve rendering of core statements w/ ORM elements"
Diffstat (limited to 'lib/sqlalchemy/sql/util.py')
| -rw-r--r-- | lib/sqlalchemy/sql/util.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/util.py b/lib/sqlalchemy/sql/util.py index 377aa4fe0..e8726000b 100644 --- a/lib/sqlalchemy/sql/util.py +++ b/lib/sqlalchemy/sql/util.py @@ -822,9 +822,14 @@ class ClauseAdapter(visitors.ReplacingExternalTraversal): # is another join or selectable that contains a table which our # selectable derives from, that we want to process return None + elif not isinstance(col, ColumnElement): return None - elif self.include_fn and not self.include_fn(col): + + if "adapt_column" in col._annotations: + col = col._annotations["adapt_column"] + + if self.include_fn and not self.include_fn(col): return None elif self.exclude_fn and self.exclude_fn(col): return None |
