Re: [sqlalchemy] [Q] Option joinedload_all with joined table inheritance

2012-09-25 Thread Ladislav Lenart
Hello. Thank you for the estimated plan for SA 0.8. I ended up with the following query for the time being: q = self.session.query(ClientProduct, PersonalClient) q = q.filter(ClientProduct.client_id == PersonalClient.id) q = q.options(joinedload_all( ClientProduct.product,

Re: [sqlalchemy] [Q] Option joinedload_all with joined table inheritance

2012-09-25 Thread Michael Bayer
On Sep 25, 2012, at 7:50 AM, Ladislav Lenart wrote: > On 24.9.2012 19:38, Michael Bayer wrote: >> >> On Sep 24, 2012, at 1:14 PM, Ladislav Lenart wrote: >> >>> Hello. >>> >>> I have tried the variant for SA 0.7. The query I tried is this: >>> >>> q = self.session.query(self.ClientProduct) >

Re: [sqlalchemy] [Q] Option joinedload_all with joined table inheritance

2012-09-25 Thread Ladislav Lenart
On 24.9.2012 19:38, Michael Bayer wrote: > > On Sep 24, 2012, at 1:14 PM, Ladislav Lenart wrote: > >> Hello. >> >> I have tried the variant for SA 0.7. The query I tried is this: >> >>q = self.session.query(self.ClientProduct) >>q = q.options(joinedload_all(A.b, B.c)) >> #q = q.option

Re: [sqlalchemy] [Q] Option joinedload_all with joined table inheritance

2012-09-24 Thread Michael Bayer
On Sep 24, 2012, at 1:14 PM, Ladislav Lenart wrote: > Hello. > > I have tried the variant for SA 0.7. The query I tried is this: > >q = self.session.query(self.ClientProduct) >q = q.options(joinedload_all(A.b, B.c)) > #q = q.options(joinedload_all( > #A.client.of_type(Person

Re: [sqlalchemy] [Q] Option joinedload_all with joined table inheritance

2012-09-24 Thread Ladislav Lenart
Hello. I have tried the variant for SA 0.7. The query I tried is this: q = self.session.query(self.ClientProduct) q = q.options(joinedload_all(A.b, B.c)) #q = q.options(joinedload_all( #A.client.of_type(PersonalClient), #PersonalClient.person) #) q = q.outerjoi

Re: [sqlalchemy] [Q] Option joinedload_all with joined table inheritance

2012-09-24 Thread Ladislav Lenart
Hello. On 24.9.2012 18:31, Michael Bayer wrote: > > On Sep 24, 2012, at 12:06 PM, Ladislav Lenart wrote: > >> Hello. >> >> Suppose the following example query >> >>q = session.query(A) >>q = q.options(joinedload_all(A.b, B.c, C.d) >>q = q.otions(joinedload_all(A.client, PersonalClie

Re: [sqlalchemy] [Q] Option joinedload_all with joined table inheritance

2012-09-24 Thread Michael Bayer
On Sep 24, 2012, at 12:06 PM, Ladislav Lenart wrote: > Hello. > > Suppose the following example query > >q = session.query(A) >q = q.options(joinedload_all(A.b, B.c, C.d) >q = q.otions(joinedload_all(A.client, PersonalClient.person) >return q > > where > >A has >b_

[sqlalchemy] [Q] Option joinedload_all with joined table inheritance

2012-09-24 Thread Ladislav Lenart
Hello. Suppose the following example query q = session.query(A) q = q.options(joinedload_all(A.b, B.c, C.d) q = q.otions(joinedload_all(A.client, PersonalClient.person) return q where A has b_id FK to b(id) client_id FK to client(id) B has c_id FK