On Sep 1, 12:13 pm, "Michael Bayer" <mike...@zzzcomputing.com> wrote:
> [...]
> have you considered the advice 
> athttp://www.sqlalchemy.org/docs/05/mappers.html#building-query-enabled...
> ?    an embedded EXISTS subquery in a relation() doesn't seem like
> something that should be emitted implicitly - hand-constructing the
> appropriate Query on a case by case basis would lead to better results.
>

Thanks for your reply Michael.

I wanted it to be a relation so that I would only have to define it
once and be able use it in different contexts, but it is not
absolutely urgent.

Also, I did try writing the query without using raw SQL, but I could
not get the relations' any() calls to correlate properly. The query I
tried, along with the generated SQL, is at http://python.pastebin.com/f5ec43ac9.
The highlighted lines show that var_clause and run_item, respectively,
are not getting correlated to the outer queries. Is there a way to
make the any() method force this correlation?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@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