[Sqlalchemy-tickets] [sqlalchemy] #2908: Regression in 0.9.x for polymorphic query
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2014-01-13 03:27:40
|
#2908: Regression in 0.9.x for polymorphic query
----------------------------+-----------------------------------------
Reporter: jeremy.skippen | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone: 0.9.xx
Component: orm | Severity: no triage selected yet
Keywords: | Progress State: awaiting triage
----------------------------+-----------------------------------------
I have a reasonably complex query which worked in 0.8.x and no longer
works in 0.9.x.
I have created a script that defines the problematic entities and then
queries for them.
Here is an ERD for the script:
[[Image(http://i40.tinypic.com/2hf3uja.png)]]
There are 2 join paths from `Record` to `UserProfile`:
- `Record` -> `User` -> `UserProfile`, and
- `Record` -> `RecordUser2` -> `User` -> `UserProfile`
Looking at the SQL output the error is pretty obvious; the second join
from `User` to `UserProfile` uses the foreign key from the first join.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2908>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|