diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-04-28 16:19:43 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-05-03 15:58:45 -0400 |
commit | 1fa3e2e3814b4d28deca7426bb3f36e7fb515496 (patch) | |
tree | 9b07b8437b1190227c2e8c51f2e942936721000f /lib/sqlalchemy/sql/util.py | |
parent | 6a496a5f40efe6d58b09eeca9320829789ceaa54 (diff) | |
download | sqlalchemy-1fa3e2e3814b4d28deca7426bb3f36e7fb515496.tar.gz |
pep484: attributes and related
also implements __slots__ for QueryableAttribute,
InstrumentedAttribute, Relationship.Comparator.
Change-Id: I47e823160706fc35a616f1179a06c7864089e5b5
Diffstat (limited to 'lib/sqlalchemy/sql/util.py')
-rw-r--r-- | lib/sqlalchemy/sql/util.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/util.py b/lib/sqlalchemy/sql/util.py index 2e0112f08..2655adbdc 100644 --- a/lib/sqlalchemy/sql/util.py +++ b/lib/sqlalchemy/sql/util.py @@ -1265,7 +1265,16 @@ class ColumnAdapter(ClauseAdapter): if self.adapt_required and c is col: return None - c._allow_label_resolve = self.allow_label_resolve + # allow_label_resolve is consumed by one case for joined eager loading + # as part of its logic to prevent its own columns from being affected + # by .order_by(). Before full typing were applied to the ORM, this + # logic would set this attribute on the incoming object (which is + # typically a column, but we have a test for it being a non-column + # object) if no column were found. While this seemed to + # have no negative effects, this adjustment should only occur on the + # new column which is assumed to be local to an adapted selectable. + if c is not col: + c._allow_label_resolve = self.allow_label_resolve return c |