diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-03-05 23:08:52 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-03-05 23:08:52 +0000 |
commit | 9154e1eff1da41c41b31e2a24a6128ff457c7716 (patch) | |
tree | 743bb691fc6e06e5b3d43c29a96568f1ac81a66e /lib/sqlalchemy/ansisql.py | |
parent | 7693a680edf9776d3037283f3d63e3aeeb06649e (diff) | |
download | sqlalchemy-9154e1eff1da41c41b31e2a24a6128ff457c7716.tar.gz |
- added concept of 'require_embedded' to corresponding_column.
requires that the target column be present in a sub-element of the
target selectable.
- embedded logic above more appropriate for ClauseAdapter functionality
since its trying to "pull up" clauses that represent columns within
a larger union up to the level of the union itself.
- the "direction" test against the "foreign_keys" collection apparently
works for an exact "column 'x' is present in the collection", no proxy
relationships needed. fixes the case of relating a selectable/alias
to one of its underlying tables, probably fixes other scenarios
Diffstat (limited to 'lib/sqlalchemy/ansisql.py')
-rw-r--r-- | lib/sqlalchemy/ansisql.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ansisql.py b/lib/sqlalchemy/ansisql.py index 19cde3862..5d5c42208 100644 --- a/lib/sqlalchemy/ansisql.py +++ b/lib/sqlalchemy/ansisql.py @@ -391,9 +391,9 @@ class ANSICompiler(sql.Compiled): c.accept_visitor(self) inner_columns[self.get_str(c)] = c continue - try: + if hasattr(c, '_selectable'): s = c._selectable() - except AttributeError: + else: c.accept_visitor(self) inner_columns[self.get_str(c)] = c continue |