Hi all,
Suppose I have two tables t1 and t2 defined as following declarative
classes.
There is no foreign key setup in database between these two tables and
I want to write the join statement in sqlalchemy format which equates
to sql like this:
select t1.c11, t1.c12, t2.c23
from t1 join t2
on
http://www.ichineseflashcards.com will help you learn Chinese
(Mandarin) faster by using flashcards with pictures, thanks
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To
Nobody seems to be answering this one so here you go:
from sqlalchemy import and_
session.query(
T1.c11, T1.c12, T2.c23).join(
T2, and_(
T1.c11==T2.c21,
T1.c12==T2.c22,
T2.c24
On Feb 19, 2012, at 5:24 AM, Andrey Popp wrote:
Regarding rationale let me describe where I can find this feature useful:
* You have a part of you tables read-only, so you only query data from them.
SQLAlchemy doesn't have to track changes on objects of classes mapped to
these