I created a testcase here 
- https://gist.github.com/jvanasco/a2ff04614a23e192ac7f

this has been stumping me this morning.

the sql I want is:

    update table_a set id_b__latest = ( :other_query )

generated from something like:

    s.execute(TableA.__table__
              .update()
              .values(id_b__latest=_q_sub)
              )

other_query is a `session.query(TableB)...limit(1)`

if other_query is a .subquery() , the generated SQL is 
"id_b__latest=SELECT" -- which fails because of no parenthesis
if other_query is a .select() or .subquery().select(), then we get an 
intermediate query "id_b__latest=(SELECT anon_1.id FROM (SELECT table_b.id"

does anyone know how I can get the parens without the wrapped intermediate 
query?









-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to