summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/activemapper.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-11-18 06:51:17 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-11-18 06:51:17 +0000
commit31b32896e81335108f77cdc44954b3c78c5f62a8 (patch)
treedd2517687ebdaa86fd77357bf1ad84021615ee78 /lib/sqlalchemy/ext/activemapper.py
parent61edeeae4cd74a825f48a1bebe6930227134d5eb (diff)
downloadsqlalchemy-31b32896e81335108f77cdc44954b3c78c5f62a8.tar.gz
cut down a good deal of Join construction overhead
Diffstat (limited to 'lib/sqlalchemy/ext/activemapper.py')
-rw-r--r--lib/sqlalchemy/ext/activemapper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ext/activemapper.py b/lib/sqlalchemy/ext/activemapper.py
index 2a39fe970..b28ada0af 100644
--- a/lib/sqlalchemy/ext/activemapper.py
+++ b/lib/sqlalchemy/ext/activemapper.py
@@ -142,9 +142,9 @@ def process_relationships(klass, was_deferred=False):
# not able to find any of the related tables
if not defer:
for col in klass.columns:
- if col.foreign_key is not None:
+ if col.foreign_keys:
found = False
- cn = col.foreign_key._colspec
+ cn = col.foreign_keys[0]._colspec
table_name = cn[:cn.rindex('.')]
for other_klass in ActiveMapperMeta.classes.values():
if other_klass.table.fullname.lower() == table_name.lower():