From 8f5a31441aed9d223e67d211472445e574fc521f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 22 Aug 2012 18:41:46 -0400 Subject: - [bug] Fixed cextension bug whereby the "ambiguous column error" would fail to function properly if the given index were a Column object and not a string. Note there are still some column-targeting issues here which are fixed in 0.8. [ticket:2553] - find more cases where column targeting is being inaccurate, add more information to result_map to better differentiate "ambiguous" results from "present" or "not present". In particular, result_map is sensitive to dupes, even though no error is raised; the conflicting columns are added to the "obj" member of the tuple so that the two are both directly accessible in the result proxy - handwringing over the damn "name fallback" thing in results. can't really make it perfect yet - fix up oracle returning clause. not sure why its guarding against labels, remove that for now and see what the bot says. --- lib/sqlalchemy/sql/expression.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/sql/expression.py') diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index ce03c9c52..cbc3b47ad 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -4325,8 +4325,9 @@ class ColumnClause(Immutable, ColumnElement): self.is_literal = is_literal def _compare_name_for_result(self, other): + # TODO: this still isn't 100% correct if self.table is not None and hasattr(other, 'proxy_set'): - return other.proxy_set.intersection(self.proxy_set) + return self.proxy_set.intersection(other.proxy_set) else: return super(ColumnClause, self).\ _compare_name_for_result(other) -- cgit v1.2.1