I'm trying to union the same query for 2 tables with the same structure, 
along with joinedloads for these tables. When I use DBSession([TABLE]) for 
each query in the union, the columns come back in different orders. If I 
specify the columns (DBSession([TABLE.COL_A], [TABLE.COL_B], ...) then the 
joinedloads fail with "Query has only expression-based entities". 

Here is some pseudo-code to hopefully make it clear what I'm trying to do:

  q0 = DBSession.query(T0).options(joinedload('ref')
  q1 = DBSession.query(T1).options(joinedload('ref')
  return q0.union_all(q1).all()

Is there another way to perform this 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to