]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Merge branch 'master' into ticket_3100
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 20 Aug 2014 18:25:20 +0000 (14:25 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 20 Aug 2014 18:25:20 +0000 (14:25 -0400)
1  2 
lib/sqlalchemy/orm/persistence.py

index a4e14d92d3db86413cbd04ee2853ba2f987e16b3,511a9cef0fb0194b0053751915a4b631f3395c57..c2750eeb32123df39c180a2650d74b79749f8069
@@@ -337,10 -249,19 +331,19 @@@ def _organize_states_for_delete(base_ma
  
          mapper.dispatch.before_delete(mapper, connection, state)
  
-         yield state, dict_, mapper, bool(state.key), connection
+         if mapper.version_id_col is not None:
+             update_version_id = \
+                 mapper._get_committed_state_attr_by_column(
+                     state, dict_,
+                     mapper.version_id_col)
+         else:
+             update_version_id = None
+         yield (
+             state, dict_, mapper, connection, update_version_id)
  
  
 -def _collect_insert_commands(table, states_to_insert):
 +def _collect_insert_commands(table, states_to_insert, bulk=False):
      """Identify sets of values to use in INSERT statements for a
      list of states.