diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2019-03-11 14:49:23 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2019-03-11 14:49:23 +0000 |
| commit | 4aadcca993ce30c25b09679178907991b4430b2e (patch) | |
| tree | 089b88ace178cb37be5179cf763ec76ee5edc02b /lib/sqlalchemy/sql/selectable.py | |
| parent | 16411cd8d64446ca705bb42320380a1fc3ef567e (diff) | |
| parent | 25fc9562f08fe26e4e2f6d4cf69c34b666f0180a (diff) | |
| download | sqlalchemy-4aadcca993ce30c25b09679178907991b4430b2e.tar.gz | |
Merge "Clone internals for Select._correlate_except collection as well as _correlate"
Diffstat (limited to 'lib/sqlalchemy/sql/selectable.py')
| -rw-r--r-- | lib/sqlalchemy/sql/selectable.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/selectable.py b/lib/sqlalchemy/sql/selectable.py index cc6d2bcc5..d4528f0c3 100644 --- a/lib/sqlalchemy/sql/selectable.py +++ b/lib/sqlalchemy/sql/selectable.py @@ -3227,6 +3227,14 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): self._correlate = set(clone(f) for f in self._correlate).union( self._correlate ) + + # do something similar for _correlate_except - this is a more + # unusual case but same idea applies + if self._correlate_except: + self._correlate_except = set( + clone(f) for f in self._correlate_except + ).union(self._correlate_except) + # 4. clone other things. The difficulty here is that Column # objects are not actually cloned, and refer to their original # .table, resulting in the wrong "from" parent after a clone |
