Re: [sqlalchemy] Couple of questions about filtering...

2013-01-22 Thread Wichert Akkerman
On Jan 22, 2013, at 08:26 , Alexey Vihorev viho...@gmail.com wrote: Hi. Couple of questions... 1. Does SQLA support deep filtering, i.e. something like this: query(Invoice).filter(Invoice.Customer.Country.name=='France') You'll need to use a join to do this:

Re: [sqlalchemy] Couple of questions about filtering...

2013-01-22 Thread Audrius Kažukauskas
On Tue, 2013-01-22 at 09:26:35 +0200, Alexey Vihorev wrote: 1. Does SQLA support deep filtering, i.e. something like this: query(Invoice).filter(Invoice.Customer.Country.name=='France') This does not work as it is, but is there something along this lines (except of going with

Re: [sqlalchemy] mysqlconnector Problem

2013-01-22 Thread Jürg Hofmann
Thanks, in wheezy is only 0.7.8, so i will try to install 0.7.9 from sid or 0.8 from sqlalchemy. Am Montag, 21. Januar 2013 16:34:06 UTC+1 schrieb Michael Bayer: please use at least version 0.7.9:

Re: [sqlalchemy] Complicated filter clause causes recursion depth exceeded exception

2013-01-22 Thread rob . crowell
Thanks Michael, Writing a big list of conditions and combining them with and_(*conditions) worked well. I was indeed querying like this before: for condition in conditions: q = q.filter(condition) print q On Friday, January 18, 2013 6:00:04 PM UTC-5, Michael Bayer wrote: On Jan 18,

RE: [sqlalchemy] Couple of questions about filtering...

2013-01-22 Thread Alexey Vihorev
Apparently, Person.full_name receives a class as an argument instead of an instance. Is there other way? That's what you want in this case, that this hybrid property would get a class, because Query works with classes. Try adding echo=True to create_engine() to see the actual SQL emitted, it

RE: [sqlalchemy] Couple of questions about filtering...

2013-01-22 Thread Alexey Vihorev
Thanks for the 'join' tip! From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Wichert Akkerman Sent: Tuesday, January 22, 2013 11:47 AM To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy] Couple of questions about filtering... On Jan 22, 2013, at

Re: [sqlalchemy] Couple of questions about filtering...

2013-01-22 Thread Audrius Kažukauskas
On Tue, 2013-01-22 at 19:58:15 +0200, Alexey Vihorev wrote: That's what you want in this case, that this hybrid property would get a class, because Query works with classes. Try adding echo=True to create_engine() to see the actual SQL emitted, it should be correct. No, that's

RE: [sqlalchemy] Couple of questions about filtering...

2013-01-22 Thread Alexey Vihorev
Ok, I've set up a complete test case: http://pastebin.com/W08w6Hg6 -Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of Audrius Kazukauskas Sent: Tuesday, January 22, 2013 8:18 PM To: sqlalchemy@googlegroups.com Subject: Re: [sqlalchemy]