From 7af9d1c04b431a98c1e19dd234a00fb202283c0a Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 13 May 2009 19:34:21 +0000 Subject: [PATCH] - Fixed obscure mapper compilation issue when inheriting mappers are used which would result in un-initialized attributes. --- CHANGES | 4 ++++ lib/sqlalchemy/orm/mapper.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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: -- 2.47.2