you mean you want this:

        m = mapper(SomeClass, mytable)
        result = m.select_by(someothertable.c.something>45)

which will automatically create a JOIN from 'mytable' to 'someothertable'.

no, there is no technical reason why that cant be done. someone could probably dig into the mechanism of select_by, which i just remembered takes not just keyword parameters but ClauseElements as well, and modify it so that the ClauseElements provided are shuffled into a JOIN the same way the keyword parameters are. ill even give you the line number to start on, line 170 of lib/sqlalchemy/mapping/ query.py .

On May 8, 2006, at 10:39 AM, Sandro Dentella wrote:

Hi all,

ok, maybe I placed too many questions so that they went unanswered. I'll
try to concentrate on this:

Is there a way to build a mapper, that is join of 2 or more tables, so that any 'select' on that mapper will *implicitly* issue any join condition
   such as 'USING' or 'attr1 = attr2'?


if not, is there any technical reason why it shouldn't be so?

   Thanks
   sandro
   *:-)



--
Sandro Dentella  *:-)
e-mail: [EMAIL PROTECTED]
http://www.tksql.org                    TkSQL Home page - My GPL work


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel? cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to