Unsymmetric inherit_condition
Issue #1039
resolved
I use polymorphic inheritance and have use inherit_condition's. In inherit_condition mapper parameter table_a.c.column_a==table_b.c.collumn_b is not the same as table_b.c.column_b==table_a.c._column_a.
It seems that the course is unsymmetric conditions in orm.mapper:
def _deferred_inheritance_condition(self, base_mapper, needs_tables):
base_mapper = base_mapper.primary_mapper()
def visit_binary(binary):
leftcol = binary.left
rightcol = binary.right
if leftcol is None or rightcol is None:
return
if leftcol.table not in needs_tables:
binary.left = sql.bindparam(None, None, type_=binary.right.type)
param_names.append((leftcol, binary.left))
elif rightcol not in needs_tables:
binary.right = sql.bindparam(None, None, type_=binary.right.type)
param_names.append((rightcol, binary.right))
Comments (3)
-
repo owner -
repo owner sorry ! lost track of this one. The issue doesn't exist in 0.5 and is fixed for 0.4 in 924ffe6dfa01e6fa5e264604a24119363cbc07b5.
-
repo owner - removed milestone
Removing milestone: 0.4.xx (automated comment)
- Log in to comment
I'm sorry I don't understand the issue here. Can you please attach a fully working test case which illustrates the issue you're having; otherwise the ticket will have to be closed.