SqlSoup joins

"Christopher Clarke" <cclarke-wYfHrJ5eQDBWk0Htik3J/[email protected]>
Newsgroups gmane.comp.python.spyce.general
Message-ID <[email protected]>
Hi

Ok i started using SqlSoup on an actual project but I am having problems
with joins.
They are pretty easy to do with SQLAlchemy so i find myself switching away
from SqlSoup for doing joins
for example:
from sqlalchemy.ext import sqlsoup

mydb=sqlalchemy.create_engine('postgres://cclarke:abcdxyz@localhost/test')

mysoup = sqlsoup.SqlSoup(mydb)
#Ok so its easy to use the soup for working on a single table
mysoup.users.select()
etc..
#Unfortunately i can't fiugue out the joins so i am forced to do stuff like
metadata = sqlalchemy.BoundMetaData(mydb)
users = sqlalchemy.Table('users',metadata,autoload=True)
emails = sqlalchemy.Table('emails',metadata,autoload=True)
#Ok now i can do simple join using table objects
s=sqlalchemy.join(users,emails).select()
rs = s.execute()
for row in rs:
    print row
What am i doing wrong
Regards
Chris

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

_______________________________________________
Spyce-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spyce-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.