diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-18 11:59:16 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-03-18 13:12:34 -0400 |
commit | dfce8c35d3f95c401957f4d0ddaf8c7f49f52ece (patch) | |
tree | 44bd505932dab87b629110c52afd1c05d497f307 /lib/sqlalchemy/orm/context.py | |
parent | 3fec5028e695ad138aa46a0ae66c55e8bcb653f6 (diff) | |
download | sqlalchemy-dfce8c35d3f95c401957f4d0ddaf8c7f49f52ece.tar.gz |
Raise at Core / ORM concrete inh level for label overlap
Fixed regression where the :class:`.ConcreteBase` would fail to map at all
when a mapped column name overlapped with the discriminator column name,
producing an assertion error. The use case here did not function correctly
in 1.3 as the polymorphic union would produce a query that ignored the
discriminator column entirely, while emitting duplicate column warnings. As
1.4's architecture cannot easily reproduce this essentially broken behavior
of 1.3 at the ``select()`` level right now, the use case now raises an
informative error message instructing the user to use the
``.ConcreteBase._concrete_discriminator_name`` attribute to resolve the
conflict. To assist with this configuration,
``.ConcreteBase._concrete_discriminator_name`` may be placed on the base
class only where it will be automatically used by subclasses; previously
this was not the case.
Fixes: #6090
Change-Id: I8b7d01e4c9ea0dc97f30b8cd658b3505b24312a7
Diffstat (limited to 'lib/sqlalchemy/orm/context.py')
0 files changed, 0 insertions, 0 deletions