diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-24 12:46:58 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-03-24 12:46:58 -0400 |
commit | 4a794aa5481b3d6e6ab3bae6d12c39d8cb228da8 (patch) | |
tree | 2133bc5354200ef37e6ca485e6c4b19b1696550f /lib/sqlalchemy/orm/query.py | |
parent | 4cf01115f669e44d77d46381f16ea5bf57197a1b (diff) | |
download | sqlalchemy-4a794aa5481b3d6e6ab3bae6d12c39d8cb228da8.tar.gz |
this version works with *all* the polymorphic scenarios by putting the subquery into
an aliased(), so that it can be controlled. self ref breaks now. will move the
joining out to use orm.join().
Diffstat (limited to 'lib/sqlalchemy/orm/query.py')
-rw-r--r-- | lib/sqlalchemy/orm/query.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py index d42a8f863..c56804847 100644 --- a/lib/sqlalchemy/orm/query.py +++ b/lib/sqlalchemy/orm/query.py @@ -1069,8 +1069,7 @@ class Query(object): left = self._joinpoint_zero() if left is right and \ - not create_aliases and \ - not self._entity_zero()._subq_aliasing: # <-- TODO: hack + not create_aliases: raise sa_exc.InvalidRequestError( "Can't construct a join from %s to %s, they are the same entity" % (left, right)) |