columns participate in the SQL rendition of a query as they are used within the 
filter(), group_by(), order_by(), and other similar generative methods on 
Query.  There is no additional step needed.

If the columns are owned by a table that is not currently participating in the 
query, the owning table is added automatically to the FROM clause of the 
rendered SQL.   It is the user's responsibility to ensure that this new table 
is appropriately joined to the existing tables of the query, either through the 
usage of filter() to equate common columns together, or via the usage of 
join().    See the examples in 
http://www.sqlalchemy.org/docs/orm/tutorial.html?highlight=joins#querying-with-joins
 .



On Dec 6, 2010, at 1:50 AM, Jurie-Jan Botha wrote:

> Is there a way to add a column to a Query object to be used elsewhere
> in the query, but prevent it from being listed in the result of the
> Query?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to