summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-01-24 23:37:03 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-01-24 23:37:03 +0000
commit9349ef38efad07157c163afa387820c870ce97e9 (patch)
treec454b9d418573641524127326d8592d849521cd8 /lib/sqlalchemy/sql.py
parent142d3f4bfd1296c045eda3e711c424a52825dab0 (diff)
downloadsqlalchemy-9349ef38efad07157c163afa387820c870ce97e9.tar.gz
- calling corresponding_column with keys_ok matches columns on name, not key, since
the name is meaningful with regards to SQL relationships, the key is not - adjustments to the recent polymorphic relationship refactorings, specifically for many-to-one relationships to polymorphic unions that did not contain the base table [ticket:439]. the lazy/eager clause adaption to the selectable will match up on straight column names (i.e. its a more liberal policy) - lazy loader will not attempt to adapt the clause to the selectable if loads_polymorphic is not enabled, since the more liberal policy of adapting columns fails for more elaborate join conditions - will have to see if ppl want to do complex joins with polymorphic relations... may have to add "polymorphic_primaryjoin" in that case as a last resort (would make working around these issues a snap, tho...)
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r--lib/sqlalchemy/sql.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py
index 5b960546e..559847261 100644
--- a/lib/sqlalchemy/sql.py
+++ b/lib/sqlalchemy/sql.py
@@ -732,7 +732,7 @@ class FromClause(Selectable):
"""given a ColumnElement, return the ColumnElement object from this
Selectable which corresponds to that original Column via a proxy relationship."""
if require_exact:
- if self.columns.get(column.key) is column:
+ if self.columns.get(column.name) is column:
return column
else:
if not raiseerr:
@@ -747,7 +747,7 @@ class FromClause(Selectable):
else:
if keys_ok:
try:
- return self.c[column.key]
+ return self.c[column.name]
except KeyError:
pass
if not raiseerr: