On Tue, 2011-07-12 at 17:47 +0200, Torsten Landschoff wrote:

> How can I correlate the subquery in this context? There is a bunch of
> correlate methods (Query.correlate, Select.correlate) but I do not
> really understand how to make use of it here.

Okay, I found it: correlate does not automatically use the foreign keys
to add a where clause for correlation. This is left to the caller.

Adding

        .where(entry_table.c.id==lookup_table.c.skipped_id)

to my example make it work.

Thanks!

Torsten


-- 
DYNAmore Gesellschaft fuer Ingenieurdienstleistungen mbH
Torsten Landschoff

Office Dresden
Tel: +49-(0)351-4519587
Fax: +49-(0)351-4519561

mailto:[email protected]
http://www.dynamore.de

Registration court: Mannheim, HRB: 109659, based in Karlsruhe,
Managing director:  Prof. Dr. K. Schweizerhof, Dipl.-Math. U. Franz

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

Reply via email to