Unable to union Resultsets using aliases

Bug #712525 reported by Bernd Rössl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Storm
New
Undecided
Unassigned

Bug Description

The test

{{{
        result1 = self.store.find(Alias(Foo.title, 'title'))
        result2 = self.store.find(Alias(Bar.title, 'title'))
        result = result1.union(result2)
}}}

fails with the error

{{{
        FeatureError: Incompatible results for set operation
}}}

caused by the method FindSpec.is_compatible(find_spec) since `info1 is not info2`.
I do not see a reason why to check the 'info' in case of a union operation.

The easiest way to fix this error is to remove the check.

{{{
@@ -1696,8 +1696,6 @@ class FindSpec(object):
             self._cls_spec_info, find_spec._cls_spec_info):
             if is_expr1 != is_expr2:
                 return False
- if info1 is not info2:
- return False
         return True

     def load_objects(self, store, result, values)
}}}

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.