summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/selectresults.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-02-01 03:18:08 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-02-01 03:18:08 +0000
commit154a831822c21ade7ff445381b1cacceb717e1e8 (patch)
tree3bc40484ca45356317522fa1a7360e2911066131 /lib/sqlalchemy/ext/selectresults.py
parent72f479b324c0b62a19e58c7b173a62b55c34a928 (diff)
downloadsqlalchemy-154a831822c21ade7ff445381b1cacceb717e1e8.tar.gz
- the "polymorphic_primaryjoin" again goes against the parent's non-polymorphic local table.
lazy load clause evaluation is plenty solid enough to handle it this time. - the join_to() method on PropertyLoader takes the parent mapper as an argument and alisiazes the primaryjoin against that mapper's selectable, so that the same primary join can be used against the base mapper, any inheriting mapper, etc., whether or not it uses a polymorphic union (although needs to be tested against alternate polymorphic unions added on subclasses). fixes [ticket:448]
Diffstat (limited to 'lib/sqlalchemy/ext/selectresults.py')
-rw-r--r--lib/sqlalchemy/ext/selectresults.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/ext/selectresults.py b/lib/sqlalchemy/ext/selectresults.py
index 23fd98893..3e7fa93c8 100644
--- a/lib/sqlalchemy/ext/selectresults.py
+++ b/lib/sqlalchemy/ext/selectresults.py
@@ -134,9 +134,9 @@ class SelectResults(object):
for key in keys:
prop = mapper.props[key]
if outerjoin:
- clause = clause.outerjoin(prop.select_table, prop.get_join())
+ clause = clause.outerjoin(prop.select_table, prop.get_join(mapper))
else:
- clause = clause.join(prop.select_table, prop.get_join())
+ clause = clause.join(prop.select_table, prop.get_join(mapper))
mapper = prop.mapper
return (clause, mapper)