diff options
Diffstat (limited to 'lib/sqlalchemy/engine/default.py')
-rw-r--r-- | lib/sqlalchemy/engine/default.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index 798d02d32..e9ea6c149 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -255,20 +255,20 @@ class DefaultExecutionContext(base.ExecutionContext): # its a pk, add the value to our last_inserted_ids list, # or, if its a SQL-side default, dont do any of that, but we'll need # the SQL-generated value after execution. - elif not param.has_key(c.key) or param[c.key] is None: + elif not c.key in param or param.get_original(c.key) is None: if isinstance(c.default, schema.PassiveDefault): self._lastrow_has_defaults = True newid = drunner.get_column_default(c) if newid is not None: - param[c.key] = newid + param.set_value(c.key, newid) if c.primary_key: - last_inserted_ids.append(param[c.key]) + last_inserted_ids.append(param.get_processed(c.key)) elif c.primary_key: need_lastrowid = True # its an explicitly passed pk value - add it to # our last_inserted_ids list. elif c.primary_key: - last_inserted_ids.append(param[c.key]) + last_inserted_ids.append(param.get_processed(c.key)) if need_lastrowid: self._last_inserted_ids = None else: @@ -290,8 +290,8 @@ class DefaultExecutionContext(base.ExecutionContext): pass # its not in the bind parameters, and theres an "onupdate" defined for the column; # execute it and add to bind params - elif c.onupdate is not None and (not param.has_key(c.key) or param[c.key] is None): + elif c.onupdate is not None and (not c.key in param or param.get_original(c.key) is None): value = drunner.get_column_onupdate(c) if value is not None: - param[c.key] = value + param.set_value(c.key, value) self._last_updated_params = param |