Apologies if this is documented and I missed it.
If B has a ForeignKey (and relationship) to A (e.g. B.a_id -> A.id), then I
can write query(B.b_num).join(A) without specifying the condition, and
SQLAlchemy will figure out the join automatically. [See query 0 in the code
below.]
It will
Ok, I define my situation.
At first, I'm appologizing for my accent :)
I have two databases, postgresql and vertica.
I have some amount of large tables, besides other tables.
Postgres stores only last two hours (or last week, depends on table) of
large tables, vertica stores all other data.
I
Could you describe what you are trying to achieve? There's nothing
about Mike's suggestion that means you need to create a new session -
you can reuse any existing session.
What does your CustomQueryCls do? Perhaps there's another way of doing
what you want?
Simon
On Tue, Jul 12, 2016 at 11:09
But it means that I should create one more session with one more connection
to DB. This is not good for me :(
понедельник, 11 июля 2016 г., 22:23:11 UTC+3 пользователь Антонио Антуан
написал:
>
> Can I specify query_cls only for a one query? I try to change
> query.session._query_cls and, of