-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Many-to-Many relationships broken on SQLAlchemy>1.3.5 #2099
Comments
There are few things that are not working with SQLAlchemy 1.4:
File "/home/travis/build/flask-admin/flask-admin/.tox/py37-WTForms2/lib/python3.7/site-packages/sqlalchemy_utils/functions/orm.py", line 14, in More here: kvesteri/sqlalchemy-utils#505
|
I tried to reproduce the M2M issue with the latest SQLAlchemy 1.4.2 and it works as expected with and without back_populates. Here's a GIST: https://gist.github.com/mrjoes/30cf8cd7865484ade357e966ad82439d sqlalchemy-utils is still a problem, our tests are failing. |
Sorry, reproduction was missing a crucial bit: |
I did not run master branch, but rather this constellation:
(flask-admin 1.5.7 is the latest in pypi) If the master branch indeed fixes the issue, a new release should be made. |
|
Guess this fixes it then. |
I change to model relation
|
Take the following model:
This will throw an error on SQLALchemy 1.4.x
Adding
back_populates
or backrefs as suggested by the error message and as documented in Basic Relationship Patterns like this:results in a new error:
The call to
inspect()
fails atis_hybrid_property()
for the attr_nametags.name
Link to gist for reproducing: app.py
Library versions:
Possibly related:
sqlalchemy_utils
uses aget_mapper
func to resolve object instead of blindly callinginspect
The text was updated successfully, but these errors were encountered: