Closed fatjan closed 8 months ago
That's no longer available, as the internal API has changed significantly in version 3. It was not marked as part of the public API. Note that the query
API is considered legacy in SQLAlchemy 2, and you should migrate to its new execution API when possible. SQLAlchemy also provides it directly: https://docs.sqlalchemy.org/en/20/orm/contextual.html#sqlalchemy.orm.scoped_session.query_property
I am using Flask-SQLAlchemy version 3.1.1 and I have the following import error issue:
ImportError: cannot import name '_QueryProperty' from 'flask_sqlalchemy'
File "/Users/user/.pyenv/versions/3.9.16/lib/python3.9/site-packages/flask_appbuilder/models/sqla/__init__.py", line 5, in <module>
Replicate: use Flask-SQLAlchemy version 3.1.1 in a Flask app
Expected behaviour: the
_QueryProperty
should be successfully imported fromflask_sqlalchemy
without any issueEnvironment: