summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-05-10 17:42:09 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-05-10 17:42:09 +0000
commit0ca037c65ed450b030c1306c04c18058ccf2c979 (patch)
tree744804a15ce633367806b6a9abdef54a0c17ef8f /lib/sqlalchemy
parent5a77974f7d070ed71a4c8062289a5aa82c7f28f9 (diff)
downloadsqlalchemy-0ca037c65ed450b030c1306c04c18058ccf2c979.tar.gz
merged r4720 from 04 branch for [ticket:1036]
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/orm/mapper.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py
index 234f33905..5569f9216 100644
--- a/lib/sqlalchemy/orm/mapper.py
+++ b/lib/sqlalchemy/orm/mapper.py
@@ -434,8 +434,9 @@ class Mapper(object):
# inherit_condition is optional.
if self.local_table is None:
self.local_table = self.inherits.local_table
+ self.mapped_table = self.inherits.mapped_table
self.single = True
- if not self.local_table is self.inherits.local_table:
+ elif not self.local_table is self.inherits.local_table:
if self.concrete:
self.mapped_table = self.local_table
for mapper in self.iterate_to_root():
@@ -1556,7 +1557,7 @@ class Mapper(object):
for mapper in util.reversed(list(self.iterate_to_root())):
if mapper.local_table in tables:
start = True
- if start:
+ if start and not mapper.single:
allconds.append(visitors.cloned_traverse(mapper.inherit_condition, {}, {'binary':visit_binary}))
cond = sql.and_(*allconds)