On Sep 26, 2008, at 6:59 AM, [EMAIL PROTECTED] wrote:
>
> hi
> say i have Person, Address, Street:
> person has (many) addresess, address has (many) streets,
> ... could be more levels down; and the relations are m2m for better
> taste (:
> how should the query 'who lives at street X', or
> "who lives at street with .name.startswith('A')" look like?
> is it expressable in relational operators or it has to be sqlized via
> joins etc?
I'd probably just use joins for this. If by "relational" operators
you're referring to any(), you can make an any() that goes across more
tables by sticking join crtierion inside the any() along with the
criterion, though that would be fairly cumbersome here since they are
m2m.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---