.. changelog::
:version: 1.1.9
+ .. change:: 3956
+ :tags: bug, ext
+ :tickets: 3956
+
+ Fixed regression released in 1.1.8 due to :ticket:`3950` where the
+ deeper search for information about column types in the case of a
+ "schema type" or a :class:`.TypeDecorator` would produce an attribute
+ error if the mapping also contained a :obj:`.column_property`.
+
.. change:: 3952
:tags: bug, sql
:versions: 1.2.0b1
for prop in mapper.column_attrs:
if (
schema_event_check and
- prop.columns[0].info.get('_ext_mutable_orig_type')
+ hasattr(prop.expression, 'info') and
+ prop.expression.info.get('_ext_mutable_orig_type')
is sqltype
) or (
prop.columns[0].type is sqltype
-from sqlalchemy import Integer, ForeignKey, String
+from sqlalchemy import Integer, ForeignKey, String, func
from sqlalchemy.types import PickleType, TypeDecorator, VARCHAR
-from sqlalchemy.orm import mapper, Session, composite
+from sqlalchemy.orm import mapper, Session, composite, column_property
from sqlalchemy.orm.mapper import Mapper
from sqlalchemy.orm.instrumentation import ClassManager
from sqlalchemy.testing.schema import Table, Column
class Foo(AbstractFoo):
__tablename__ = "foo"
+ column_prop = column_property(
+ func.lower(AbstractFoo.unrelated_data))
assert Foo.data.property.columns[0].type is not AbstractFoo.data.type