New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
joined eager load innerjoin=True not accommodated by with_polymorphic / joined inh #3988
Comments
Julien Cigar wrote: the problem is that SQLAlchemy generates:
instead of something like:
|
Michael Bayer (@zzzeek) wrote: so this is because of your innerjoin=True on that relationship. this is a difficult issue to fix and I don't have any solution for it at the moment. you'd need to be explicit about your innerjoin and either turn it off w/ the with_polymorphic or leave it off by default for now. |
Michael Bayer (@zzzeek) wrote: this is a tricky one and will take some time / thought. |
Changes by Michael Bayer (@zzzeek):
|
Changes by Michael Bayer (@zzzeek):
|
Michael Bayer (@zzzeek) wrote: https://gerrit.sqlalchemy.org/402 this is for 1.2 at the moment, I'm a little nervous about a 1.1 for this because it will change queries from INNER JOIN to OUTER JOIN, if some app is silently relying on this and is not hitting the bug (because they really are loading only one kind of entity) it could cause a sudden performance issue. |
Changes by Michael Bayer (@zzzeek):
|
Julien Cigar wrote: thank you very much for the quick fix :-) much appreciated! |
Michael Bayer (@zzzeek) wrote: Demote innerjoin to outerjoin coming from with_polymorphic a with_polymorphic, regardless of inheritance type, represents Change-Id: I4d3d76106ae20032269f8848aad70a8e2f9422f9 → 94a089b |
Changes by Michael Bayer (@zzzeek):
|
Migrated issue, originally created by Julien Cigar
Please see the test case, the error is pretty clear I think :)
Attachments: pol.py
The text was updated successfully, but these errors were encountered: