Hi,
I've had a look through the docs and a quick look through the forum
here, and haven't been able to solve my problem. I'm using 0.4

The following works as expected.

q =
System.query().join('activity').group_by(model.System.id).add_column(func.max(Activity.id))

The add_column() recognises that the activity table is already joined.
and thus does not add it to the tables in the 'FROM' clause.


However, the following does not work. The only difference is that now
the joined table (activity) is aliased.

q =
System.query().join('activity',aliased=True).group_by(model.System.id).add_column(func.max(Activity.id))

add_column() does not recognise the aliased activity table and the
from clause now looks something like 'FROM system,activity', whereas
it should be joined.

What are my best solutions?

Cheers
Ray



-- 
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