summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/mapper.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-04-23 22:17:25 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-04-23 22:17:25 -0400
commitcb3913a186a01d9425e0ba97de89aa6d7d64ab96 (patch)
tree7616eade5c09cb0b6e833d8e881f795f4ea965f5 /lib/sqlalchemy/orm/mapper.py
parent841ea194bd7cf239323ee21320210fd6dc5c551d (diff)
downloadsqlalchemy-cb3913a186a01d9425e0ba97de89aa6d7d64ab96.tar.gz
- [feature] New standalone function with_polymorphic()
provides the functionality of query.with_polymorphic() in a standalone form. It can be applied to any entity within a query, including as the target of a join in place of the "of_type()" modifier. [ticket:2333] - redo a large portion of the inheritance docs in terms of declarative, new with_polymorphic() function - upgrade examples/inheritance/polymorph, rename to "joined"
Diffstat (limited to 'lib/sqlalchemy/orm/mapper.py')
-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 0771bbf3d..795447763 100644
--- a/lib/sqlalchemy/orm/mapper.py
+++ b/lib/sqlalchemy/orm/mapper.py
@@ -1358,7 +1358,8 @@ class Mapper(object):
spec = self.with_polymorphic[0]
if selectable is False:
selectable = self.with_polymorphic[1]
-
+ elif selectable is False:
+ selectable = None
mappers = self._mappers_from_spec(spec, selectable)
if selectable is not None:
return mappers, selectable