How do I build a ClauseElement using a mapped object.

Say I have a mapped object I got like so:
     county = session.query(Counties).get(1)

I want to use this to construct a query.  How do I build a ClauseElement 
with it?

# This does not work, but it expresses what I'm trying to do.
expr = Project.county == county

projects = session.query(Project).select(expr)

Is this in the docs?  Sorry if I missed it.

Randall


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

Reply via email to