In SQLAlchemy 2.0, the equivalent of User.query.get(1) in Flask-SQLAlchemy is User.query.filter_by(id=1).first(). Here, you are filtering the User query by the id column and returning the first result.
Asked: 2022-02-24 11:00:00 +0000
Seen: 7 times
Last updated: Jan 28 '22