From: Mike Bayer Date: Fri, 5 Sep 2014 20:29:08 +0000 (-0400) Subject: Merge branch 'master' into ticket_3100 X-Git-Tag: rel_1_0_0b1~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d39daa43fe79c40419adf4babc5ae04f814461b7;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Merge branch 'master' into ticket_3100 --- d39daa43fe79c40419adf4babc5ae04f814461b7 diff --cc lib/sqlalchemy/orm/persistence.py index 2a697a6f98,74e69e44c5..1288c910f9 --- a/lib/sqlalchemy/orm/persistence.py +++ b/lib/sqlalchemy/orm/persistence.py @@@ -923,12 -799,11 +923,12 @@@ def _postfetch(mapper, uowtransaction, after an INSERT or UPDATE statement has proceeded for that state.""" - prefetch_cols = result.context.prefetch_cols - postfetch_cols = result.context.postfetch_cols - returning_cols = result.context.returning_cols + prefetch_cols = result.context.compiled.prefetch + postfetch_cols = result.context.compiled.postfetch + returning_cols = result.context.compiled.returning - if mapper.version_id_col is not None: + if mapper.version_id_col is not None and \ + mapper.version_id_col in mapper._cols_by_table[table]: prefetch_cols = list(prefetch_cols) + [mapper.version_id_col] if returning_cols: