use flask-sqlalchemy's query_class to override query object