diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2021-07-29 15:16:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2021-07-29 15:16:41 +0000 |
commit | 84be0b42e03b0aaf8000637c4b5e348a39333e2f (patch) | |
tree | ea814f4be4096d4b73075d854fac77718e55d308 /lib/sqlalchemy/sql/compiler.py | |
parent | 5e88cccf869f9ac258a5c34c4f5c9be036ca0410 (diff) | |
parent | 1ccaac8293ee69f22dd01766a26c3ca7893c6a83 (diff) | |
download | sqlalchemy-84be0b42e03b0aaf8000637c4b5e348a39333e2f.tar.gz |
Merge "accommodate for cloned bindparams w/ maintain_key"
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 29ef8047e..a81507acb 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -2311,8 +2311,14 @@ class SQLCompiler(Compiled): existing = self.binds[name] if existing is not bindparam: if ( - existing.unique or bindparam.unique - ) and not existing.proxy_set.intersection(bindparam.proxy_set): + (existing.unique or bindparam.unique) + and not existing.proxy_set.intersection( + bindparam.proxy_set + ) + and not existing._cloned_set.intersection( + bindparam._cloned_set + ) + ): raise exc.CompileError( "Bind parameter '%s' conflicts with " "unique bind parameter of the same name" % name |