[storm] Fwd: Re: Re: multiple join's

Gordon Allott gordallott at gmail.com
Thu Jan 15 15:06:31 GMT 2009


On Thu, 2009-01-15 at 08:03 -0300, Eduardo Willians wrote:

> Are you sure this gonna work?
> 
> I tried this:
> 
> >>> res2 = store.find(Client, Client.cpf.is_in(result))
> 
> And I got this:
> 
> TypeError: Expected int, found <class 'app.model.tables.Client'>:
> <app.model.tables.Client object at 0x018DF610>

yes that produces errors but a quick change fixes it:
ids = [Company.id for id in company_ids]
companies = store.find(Company, Company.id.is_in(ids))

Thanks guys this helps a lot, I am sure there must be a better way to do
this but efficiency isn't a big concern in this application (desktop
application with a small result set. It sure would be nice if there were
a nicer, more "pythonic" way to do it in Storm however.
-- 
Gordon Allott (gordallott at gmail.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/storm/attachments/20090115/60aae08f/attachment.pgp 


More information about the storm mailing list