Paul's Programming Notes
PostsRSSGithub

SQLAlchemy - "Base.query = db_session.query_property()"

13 Feb 2017

I just saw this line in the SQLAlchemy flask patterns example:

Base.query = db_session.query_property()

I went searching for what it does and found this: https://eoyilmaz.blogspot.com/2014/01/i-feel-so-much-hungry-about-posting.html

Now I know how Flask-SQLAlchemy made queries work with Model.query instead of session.query(Model).

pythonflasksqlalchemy

Related posts

  • Is it necessary to run SQLAlchemy's session.remove()? 23 Oct 2016
  • Django-Moderation 21 May 2016
  • SQLAlchemy's "scale" Argument & WTForms 23 Dec 2015
© 2026. All rights reserved.