- changed status to wontfix
self-referential relations using multi-column foreign keys where at least 1 column of the foreign key is also a primary key don't work
Issue #1448
resolved
The code in sqlalchemy/orm/properties.py chooses the wrong direction for multi-column, self-referential foreign keys which share columns with the primary key. It chooses ONETOMANY because there is at least 1 foreign key column which is also a primary key. The attached patch changes the logic to only choose ONETOMANY if all foreign key columns are primary key columns.
Comments (1)
-
repo owner - Log in to comment
check CHANGES in trunk. this exact issue has already been fixed.