Files
sqlalchemy/test/sql
Mike Bayer 53b7b8de65 Use separate label generator for column_label naming convention
Fixed bug where a table that would have a column label overlap with a plain
column name, such as "foo.id AS foo_id" vs. "foo.foo_id", would prematurely
generate the ``._label`` attribute for a column before this overlap could
be detected due to the use of the ``index=True`` or ``unique=True`` flag on
the column in conjunction with the default naming convention of
``"column_0_label"``.  This would then lead to failures when ``._label``
were used later to generate a bound parameter name, in particular those
used by the ORM when generating the WHERE clause for an UPDATE statement.
The issue has been fixed by using an alternate ``._label`` accessor for DDL
generation that does not affect the state of the :class:`.Column`.   The
accessor also bypasses the key-deduplication step as it is not necessary
for DDL, the naming is now consistently ``"<tablename>_<columnname>"``
without any subsequent numeric symbols when used in DDL.

Fixes: #4911

Change-Id: Iabf5fd3250738d800d6e41a2a3a27a7ce2405e7d
(cherry picked from commit 41dc71ad2f)
2019-10-14 12:53:48 -04:00
..
2019-01-06 18:23:11 -05:00
2019-01-06 18:23:11 -05:00
2019-01-06 18:23:11 -05:00
2019-06-21 10:18:17 -04:00
2019-06-21 10:18:17 -04:00
2019-07-21 16:30:31 -04:00
2019-03-05 20:29:05 -05:00
2019-01-06 18:23:11 -05:00
2019-01-25 14:56:50 -05:00
2019-01-06 18:23:11 -05:00
2019-01-06 18:23:11 -05:00
2019-01-06 18:23:11 -05:00
2019-06-21 10:18:17 -04:00
2019-01-06 18:23:11 -05:00
2019-01-06 18:23:11 -05:00