On May 21, 2:04 am, [EMAIL PROTECTED] wrote:
> what u want to accomplish?

Well, it's the equivalent of the SQL "IN".

So i want to retrieve all Measurements which are associated with with
a Time Series in the given list.  The SQL equivalent would be
something like:

SELECT * from Measurement as M where M.time_series_id in (123, 456,
789)

except that I am using objects and have a list of TimeSeries
instances.

My question wasn't about how to use SQL, but whether the failure I was
seeing when trying to use "in_" (which is mentioned very briefly in an
example in the documentation) is because that feature is not
supported, or because of an error in my code.

The example in the documentation is:
>>> session.query(Address).filter(
...     Address.email_address.in_(['[EMAIL PROTECTED]',
'[EMAIL PROTECTED]'])

but that is using a literal field rather than a reference generated by
mapper(...properties={...relation...}) (as in my case with
time_series).  So my suspicion is that in_ is not implemented when the
attribute is generated in that way.

Andrew

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to