summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/compiler.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-02-12 21:16:31 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-02-12 21:16:31 +0000
commit9fffa2c7e1539689750ead7cd70f2d4812322a77 (patch)
treeb1e29451f30ec66505c646d9cac9a6ce44f97490 /lib/sqlalchemy/sql/compiler.py
parent85e8cb7ffb9134fa34135bf83d231e0e55b0d0cf (diff)
downloadsqlalchemy-9fffa2c7e1539689750ead7cd70f2d4812322a77.tar.gz
- fixed bug introduced in r4070 where union() and other compound selects would not get
an OID column if it only contained one selectable element, due to missing return in _proxy_column() - visit_column() calls itself to render a primary key col being used as the interpretation of the oid col instead of relying upon broken partial logic
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r--lib/sqlalchemy/sql/compiler.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index 02f6efce1..e87d3d2fb 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -269,8 +269,7 @@ class DefaultCompiler(engine.Compiled):
return schema_prefix + self.preparer.quote(column.table, ANONYMOUS_LABEL.sub(self._process_anon, column.table.name)) + "." + n
elif len(column.table.primary_key) != 0:
pk = list(column.table.primary_key)[0]
- pkname = (pk.is_literal and name or self._truncated_identifier("colident", pk.name))
- return schema_prefix + self.preparer.quote(column.table, ANONYMOUS_LABEL.sub(self._process_anon, column.table.name)) + "." + self.preparer.quote(pk, pkname)
+ return self.visit_column(pk, result_map=result_map, use_schema=use_schema, **kwargs)
else:
return None
elif column.table is None or not column.table.named_with_column: