- attached test_joined_adjacency.py
mapper error with adjaceny list + joined tables [with test & patch]
Attached is a test case which demonstrates a bug related to adjacency lists + joined tables. The test case is for 0.7, but I think the bug was introduced in 13cc1279f83f84b02d19ed8def0fcee09e9fddb1 of 0.5.
From what I can tell, it looks like ''RelationshipProperty._refers_to_parent_table()'' is incorrectly returning False for the test case's "supervisor" property, causing ''RelationshipProperty._determine_direction()'' to treat it as a normal relationship, not an adjacency.
The 0.4 ''_refers_to_parent_table()'' handled this correctly, but did not correctly handle the issue in ''test.orm.test_polymorph2:RelationshipTest8''. The replacement 0.5 version of ''_refers_to_parent_table()'' fixed that test case, causes the attached test case to fail instead.
Attached is a patch to ''_refers_to_parent_table()'' which seems to satisfy both the attached case, and ''RelationshipTest8'' simultaneously.
Comments (8)
-
Account Deleted -
Account Deleted - attached refers_to_parent.patch
patch which appears to fix issue
-
repo owner interesting, will target this at 0.6.8. orm showstoppers like this are pretty high priority
-
repo owner might need to go with your patch temporarily, but it doesn't work for the attached case at the bottom. the logic in that block needs a deeper rethink...yet again.
-
repo owner I think I got it, attached.
-
Account Deleted Ah ha. I had a feeling there was a much cleaner solution than my original patch, but couldn't come up with it. And I can confirm 2149.patch works great in the program that led me to this bug originally :)
-
repo owner - changed status to resolved
-
repo owner - removed milestone
Removing milestone: 0.6.8 (automated comment)
- Log in to comment
test case for 0.7 demonstrating issue