From 3d38969fd4f88d996d438df63f7cbb1833b63429 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 31 Aug 2009 20:38:14 +0000 Subject: - Inserting NULL into a primary key + foreign key column will allow the "not null constraint" error to raise, not an attempt to execute a nonexistent "col_id_seq" sequence. [ticket:1516] - autoincrement SELECT statements, i.e. those which select from a procedure that modifies rows, now work with server-side cursor mode (the named cursor isn't used for such statements.) --- lib/sqlalchemy/sql/compiler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 78529ee6d..7bd0c1b05 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -844,8 +844,7 @@ class SQLCompiler(engine.Compiled): self.dialect.supports_sequences or not isinstance(c.default, schema.Sequence) ) - ) or \ - self.dialect.preexecute_autoincrement_sequences: + ) or self.dialect.preexecute_autoincrement_sequences: values.append((c, self._create_crud_bind_param(c, None))) self.prefetch.append(c) -- cgit v1.2.1