diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-12-08 02:31:59 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-12-08 02:31:59 +0000 |
| commit | 358bc9db1c86fc26d89ed726305a109af14e2572 (patch) | |
| tree | 6650d4db12648cb404b16c15db5e53f0d794e9b6 /lib/sqlalchemy/sql | |
| parent | 1b1acad676efc2f1fa616d1421b544219e65e953 (diff) | |
| download | sqlalchemy-358bc9db1c86fc26d89ed726305a109af14e2572.tar.gz | |
- removed needless "counter" behavior with select()
labelnames that match a column name in the table,
i.e. generates "tablename_id" for "id", instead of
"tablename_id_1" in an attempt to avoid naming
conflicts, when the table has a column actually
named "tablename_id" - this is because
the labeling logic is always applied to all columns
so a naming conflict will never occur.
Diffstat (limited to 'lib/sqlalchemy/sql')
| -rw-r--r-- | lib/sqlalchemy/sql/expression.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/sqlalchemy/sql/expression.py b/lib/sqlalchemy/sql/expression.py index 1b9f89ae1..b7708c338 100644 --- a/lib/sqlalchemy/sql/expression.py +++ b/lib/sqlalchemy/sql/expression.py @@ -3022,14 +3022,6 @@ class ColumnClause(_Immutable, ColumnElement): label = _escape_for_generated(self.table.name) + "_" + \ _escape_for_generated(self.name) - if label in self.table.c: - # TODO: coverage does not seem to be present for this - _label = label - counter = 1 - while _label in self.table.c: - _label = label + "_" + str(counter) - counter += 1 - label = _label return _generated_label(label) else: |
