Re: [Sqlalchemy-tickets] [sqlalchemy] #2918: polymorphic aliasing failure when using trivial column
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2014-01-23 19:13:32
|
#2918: polymorphic aliasing failure when using trivial column subclass
------------------------------+-------------------------------
Reporter: zzzeek | Owner: zzzeek
Type: defect | Status: new
Priority: highest | Milestone: 0.9.xx
Component: orm | Severity: major - 1-3 hours
Resolution: | Keywords:
Progress State: in progress |
------------------------------+-------------------------------
Comment (by zzzeek):
it's annotations, here's a test case:
{{{
#!python
from sqlalchemy import Column
class MySpecialColumn(Column):
pass
col = MySpecialColumn('x', String)
binary_1 = col == 5 # caches col.comparator, col.comparator.expr == col
c2 = col._annotate({"x": "foo"}) # uses Annotated, not AnnotatedColumn,
as base class
binary_2 = c2 == 5 # fails to use a new col.comparator, uses the old one
with col and missing annotatinos
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2918#comment:1>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|