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
Accessing AssociationProxy of aliased model breaks it #4116
Comments
Changes by Dmytro Starosud (@dima-starosud):
|
1 similar comment
Changes by Dmytro Starosud (@dima-starosud):
|
Michael Bayer (@zzzeek) wrote:
that would be very complicated. I will make it resolve the alias to the real class. |
Michael Bayer (@zzzeek) wrote: https://gerrit.sqlalchemy.org/#/q/I9161bab67766bb75d73ca54d712ad1cad6de40dc |
Changes by Michael Bayer (@zzzeek):
|
Changes by Michael Bayer (@zzzeek):
|
Dmytro Starosud (@dima-starosud) wrote: Thanks @zzzeek Does |
Michael Bayer (@zzzeek) wrote: it means I'm cherry-picking it to the 1.1 branch as well which you can see in the above linked gerrit. So the next 1.1 release would also include it. |
Michael Bayer (@zzzeek) wrote: Resolve AliasedClass when determining owning class of association proxy Fixed bug where the association proxy would inadvertently link itself Change-Id: I9161bab67766bb75d73ca54d712ad1cad6de40dc → f14a58d |
Michael Bayer (@zzzeek) wrote: Resolve AliasedClass when determining owning class of association proxy Fixed bug where the association proxy would inadvertently link itself Change-Id: I9161bab67766bb75d73ca54d712ad1cad6de40dc → e111940 |
Changes by Michael Bayer (@zzzeek):
|
Dmytro Starosud (@dima-starosud) wrote: Thanks @zzzeek ! |
Migrated issue, originally created by Dmytro Starosud (@dima-starosud)
This is using sqlalchemy 1.2.0b3.
When
AssociationProxy
is first accessed onaliased
it leads to settingowning_class
to thatAliasedClass
, which then leads to exceptions inside lib.Please see details in following code snippet.
Probably mapper should access
AssociationProxy
immediately after it's added to the model to triggerowning_class
initialization.The text was updated successfully, but these errors were encountered: