Query takes the Session as an argument so you should be able to say:
q = MyQuery([MyModel], session=my_session) On 07/11/2016 03:23 PM, Антонио Антуан wrote:
Can I specify query_cls only for a one query? I try to change query.session._query_cls and, of course, it doesn't work... I want to perform something like this: query = Session.query(MyModel)... default_querycls_result = query.all() custom_querycls_result = query.change_query_cls(CustomQueryCls).all()
-- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
