From: Mike Bayer Date: Wed, 13 May 2009 19:34:21 +0000 (+0000) Subject: - Fixed obscure mapper compilation issue when inheriting X-Git-Tag: rel_0_5_4~8 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=7af9d1c04b431a98c1e19dd234a00fb202283c0a;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - Fixed obscure mapper compilation issue when inheriting mappers are used which would result in un-initialized attributes. --- diff --git a/CHANGES b/CHANGES index 04e7d2d145..6161ae6de2 100644 --- a/CHANGES +++ b/CHANGES @@ -54,6 +54,10 @@ CHANGES from a base class to a joined-table subclass would not configure correctly. + - Fixed obscure mapper compilation issue when inheriting + mappers are used which would result in un-initialized + attributes. + - Fixed documentation for session weak_identity_map - the default value is True, indicating a weak referencing map in use. diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index e5dbb4d039..8af6153d6b 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -682,7 +682,7 @@ class Mapper(object): for key, prop in l: self._log("initialize prop " + key) - if not prop._compile_started: + if prop.parent is self and not prop._compile_started: prop.init() if prop._compile_finished: