> > Hi. > > I know that I can do SQL UNION of two record sets when using SQL > > Expression objects. But how to do UNION of two sqlalchemy.orm.Query > > objects? I can do the UNION on SQL Expressions level and then use > > 'from_statement' from Query, but what I can do if I already have two > > Queries? > > you can pull out the select() generated by Query using > query.compile(). > ...
So, I see that in SA when I have to do complicated queries or queries that must be ready for further enhancements I should use SQL Expressions, not "object oriented" Queries... BTW., Hibernate's HQL doesn't support UNION too. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
