summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-02-09 15:14:54 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-02-09 15:14:54 -0500
commit34f26ee255bf64cf6de6fb9a5f1285b696fa4bbd (patch)
tree26b00cada5ffb1c7bf56aeb9029b7d3ba74bea2c /lib
parent6f16b8db6f08cefd68cdf251292316497eb849b3 (diff)
downloadsqlalchemy-34f26ee255bf64cf6de6fb9a5f1285b696fa4bbd.tar.gz
- Fixed bug where a column with a SQL or server side default
that was excluded from a mapping with include_properties or exclude_properties would result in UnmappedColumnError. [ticket:1995]
Diffstat (limited to 'lib')
-rw-r--r--lib/sqlalchemy/orm/mapper.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py
index db445076c..a6d2c95f5 100644
--- a/lib/sqlalchemy/orm/mapper.py
+++ b/lib/sqlalchemy/orm/mapper.py
@@ -1937,7 +1937,8 @@ class Mapper(object):
if postfetch_cols:
state.expire_attributes(state.dict,
[self._columntoproperty[c].key
- for c in postfetch_cols]
+ for c in postfetch_cols if c in
+ self._columntoproperty]
)
# synchronize newly inserted ids from one table to the next