From eb4abda8117263f1e1775460b47076ec70e092d4 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 14 Jul 2014 18:28:07 -0400 Subject: - Fixed bug where multi-valued :class:`.Insert` construct would fail to check subsequent values entries beyond the first one given for literal SQL expressions. fixes #3069 --- lib/sqlalchemy/sql/compiler.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/sql/compiler.py') diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 90a65a7e2..32ecb2eae 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -2211,10 +2211,12 @@ class SQLCompiler(Compiled): [ ( c, - self._create_crud_bind_param( + (self._create_crud_bind_param( c, row[c.key], name="%s_%d" % (c.key, i + 1) - ) + ) if elements._is_literal(row[c.key]) + else self.process( + row[c.key].self_group(), **kw)) if c.key in row else param ) for (c, param) in values_0 -- cgit v1.2.1