diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-12-03 19:50:01 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-12-03 19:50:01 -0500 |
| commit | 699146086df8fd8778582a03267f8f28c5cdad7a (patch) | |
| tree | 80118f3c361508f0aab5f10995f96870bdc8cc5d /lib/sqlalchemy/orm/properties.py | |
| parent | d628967ad21ab103f3c2766728a5b18923348795 (diff) | |
| download | sqlalchemy-699146086df8fd8778582a03267f8f28c5cdad7a.tar.gz | |
- [bug] Fixed bug whereby column_property() created
against ORM-level column could be treated as
a distinct entity when producing certain
kinds of joined-inh joins. [ticket:2316]
- [bug] related to [ticket:2316], made some
adjustments to the change from [ticket:2261]
regarding the "from" list on a select(). The
_froms collection is no longer memoized, as this
simplifies various use cases and removes the
need for a "warning" if a column is attached
to a table after it was already used in an
expression - the select() construct will now
always produce the correct expression.
There's probably no real-world
performance hit here; select() objects are
almost always made ad-hoc, and systems that
wish to optimize the re-use of a select()
would be using the "compiled_cache" feature.
A hit which would occur when calling select.bind
has been reduced, but the vast majority
of users shouldn't be using "bound metadata"
anyway :).
Diffstat (limited to 'lib/sqlalchemy/orm/properties.py')
| -rw-r--r-- | lib/sqlalchemy/orm/properties.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/properties.py b/lib/sqlalchemy/orm/properties.py index a1042b98b..330a85108 100644 --- a/lib/sqlalchemy/orm/properties.py +++ b/lib/sqlalchemy/orm/properties.py @@ -19,6 +19,7 @@ from sqlalchemy.orm import attributes, dependency, mapper, \ object_mapper, strategies, configure_mappers from sqlalchemy.orm.util import CascadeOptions, _class_to_mapper, \ _orm_annotate, _orm_deannotate + from sqlalchemy.orm.interfaces import MANYTOMANY, MANYTOONE, \ MapperProperty, ONETOMANY, PropComparator, StrategizedProperty mapperlib = util.importlater("sqlalchemy.orm", "mapperlib") @@ -60,7 +61,8 @@ class ColumnProperty(StrategizedProperty): :param extension: """ - self.columns = [expression._labeled(c) for c in columns] + self.columns = [expression._labeled(_orm_deannotate(c)) + for c in columns] self.group = kwargs.pop('group', None) self.deferred = kwargs.pop('deferred', False) self.instrument = kwargs.pop('_instrument', True) |
