]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
we can always adapt to right also. suppose if right
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 25 Apr 2013 18:29:48 +0000 (14:29 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 25 Apr 2013 18:29:48 +0000 (14:29 -0400)
were an alias of a table, should add tests for that.

lib/sqlalchemy/orm/util.py

index a594af259bfc7acc48a19468441832c489c32a94..35cb0bdf5dd5198360386ed433db92fa953dcce4 100644 (file)
@@ -876,11 +876,7 @@ class _ORMJoin(expression.Join):
         left_orm_info = getattr(left, '_joined_from_info', left_info)
 
         right_info = inspection.inspect(right)
-
-        if getattr(right_info, 'is_aliased_class', False):
-            adapt_to = right_info.selectable
-        else:
-            adapt_to = None
+        adapt_to = right_info.selectable
 
         self._joined_from_info = right_info