Comment 2 for bug 1044238

Revision history for this message
Jian Wen (wenjianhn) wrote :

NOTE

Mark McLoughlin has posted comments on this change.

Change subject: Fixes sqlalchemy.api.compute_node_get_by_host
......................................................................

Patch Set 2: Looks good to me (core reviewer); Approved

The note here:

  http://docs.sqlalchemy.org/en/rel_0_7/orm/tutorial.html#joined-load

appears to make it fairly clear:

  The join created by joinedload() is anonymously aliased such that it does not affect the query results. An Query.order_by() or Query.filter() call cannot reference these aliased tables

I would have liked to have seen a test case for this and a little more explanation in the commit message, but thanks for the fix!