[sqlalchemy] SQL join on multiple columns with no foreign key

2012-02-26 Thread Flair
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

[sqlalchemy] Linsanity - Learn Chinese (Mandarin) faster by using flashcards with pictures

2012-02-26 Thread w0K7ubdsm4 w0K7ubdsm4
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

Re: [sqlalchemy] SQL join on multiple columns with no foreign key

2012-02-26 Thread Michael Bayer
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

Re: [sqlalchemy] Reducing instrumentation overhead for read-only entities

2012-02-26 Thread A.M.
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