Michael Bayer wrote: > > On Sep 11, 2006, at 6:37 PM, Eric Brunson wrote: > >> >> I want a list of columns that I can use in a query. I was thinking >> SA may already have a function that would build a column clause with >> foreign key references in it and maybe even generate the list of >> tables and join/where clause. > > you can do str(table1.join(table2).join(table3).select())
Eureka! (Can you say that if someone else finds it?) That sounds exactly like what I'm looking for, I'll play with that tomorrow. Thanks a ton. Can it handle joining a table to itself? Sorry for not being more familiar with the entire library, though it is rather extensive. > >> I was hoping that, with all SA's kickass features for data coherency, >> it might be able to generate joins, etc. I see it's still very >> single record/single table oriented in that respect. > > SA has extensive joining capabilities and theyre documented (although > adding maybe a few dozen example scripts in the distro would hurt > either). the ORM makes usage of the same query-generation facilities > you have direct access to...and if you look at some of the joins > generated by the eager loads, or the unions used in polymorphic > loading, i cant see how youd think SA isnt multi-table oriented. SA > can do more extensive joins than hibernate is capable of. > Oh, crap, I've offended you. I'm totally sorry, I have read a lot of the documentation, all the tutorials and the example code, but I didn't fully appreciate everything it could do. Like I said, I definitely need to understand more of the capabilities. Unfortunately, all the tutorial examples and example code tend toward the more basic functionss. Not a criticism of SA in particular, most projects I've seen have the same trait. In particular I've noticed that most ORMs, SA or otherwise, start with the ORM creating the schema and therefore assume pre-knowledge of the relations. Rarely do you see examples of gleaning the relations from the metadata to build your code dynamically, like I'm trying to do. Thanks again for the pointers. Sincerely, e. P.S. Sorry for responding off list before, the reply and reply-all buttons look so much alike. ------------------------------------------------------------------------- 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 Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users