Re: [sqlalchemy] polymorphic eager loading

2015-11-24 Thread Mike Bayer
On 11/24/2015 06:14 PM, Christopher Lee wrote: > > I am having a problem with SQLAlchemy 1.0.9 that cropped up when I > upgraded from 0.8. this is a nicely written test but I get the same recursion overflow error when I run it in 0.8, 0.9, and 1.0, even back in 0.8.3. Can you provide a script

Re: [sqlalchemy] polymorphic eager loading

2015-11-24 Thread Mike Bayer
On 11/24/2015 07:16 PM, Christopher Lee wrote: > The test passes for me in 0.8.0. (Yes, we have 0.8.0 running in > production, and are finally getting around to upgrading... sigh...) agree. and it then fails in 0.8.1, so this is something very immediate and old in the 0.8 series I'll start

[sqlalchemy] polymorphic eager loading

2015-11-24 Thread Christopher Lee
I am having a problem with SQLAlchemy 1.0.9 that cropped up when I upgraded from 0.8. I have the following polymorphic relationship defined. For some reason, when I build a tree, and I try to access the children of the middle node of the tree, it is picking up the wrong edge object and going

Re: [sqlalchemy] polymorphic eager loading

2015-11-24 Thread Christopher Lee
The test passes for me in 0.8.0. (Yes, we have 0.8.0 running in production, and are finally getting around to upgrading... sigh...) On Tue, Nov 24, 2015 at 4:09 PM, Christopher Lee wrote: > I'll see if I can nail down the repro; I had to abstract some production > code

Re: [sqlalchemy] sql works when run manually, not when part of sqlalchemy query

2015-11-24 Thread Mike Bayer
no idea. you have any kind of isolated test case? http://stackoverflow.com/help/mcve ? On 11/24/2015 12:17 AM, robert rottermann wrote: > Hi there, > > DB: mysql 5.5.46-0ubuntu0.12.04.2 > Python: 2.7.3 > SQLAlchemy-1.0.9-py2.7-linux-x86_64.egg > > snippet that provokes trace back: >

Re: [sqlalchemy] polymorphic eager loading

2015-11-24 Thread Mike Bayer
I've bisected it down and this one is going to be tough. https://bitbucket.org/zzzeek/sqlalchemy/issues/3593/eager-loading-single-inh-polymorphic-join is added. On 11/24/2015 07:20 PM, Mike Bayer wrote: > > > On 11/24/2015 07:16 PM, Christopher Lee wrote: >> The test passes for me in 0.8.0.

[sqlalchemy] sql works when run manually, not when part of sqlalchemy query

2015-11-24 Thread robert rottermann
Hi there, DB: mysql 5.5.46-0ubuntu0.12.04.2 Python: 2.7.3 SQLAlchemy-1.0.9-py2.7-linux-x86_64.egg snippet that provokes trace back: c = tblMembership.__table__.c records = session.query(tblMembership).filter(c['idPerson'] == member_id).all() I use a zope/plone python

Re: [sqlalchemy] polymorphic eager loading

2015-11-24 Thread Mike Bayer
On 11/24/2015 08:19 PM, Mike Bayer wrote: > I've bisected it down and this one is going to be tough. > https://bitbucket.org/zzzeek/sqlalchemy/issues/3593/eager-loading-single-inh-polymorphic-join > is added. I've figured out exactly where a simple thing was going wrong with this and produced

Re: [sqlalchemy] polymorphic eager loading

2015-11-24 Thread Christopher Lee
I'll see if I can nail down the repro; I had to abstract some production code that I am migrating between versions, and I may have lost some important detail. Looking at the SQL it generates before and after moving the "links" relationship, it appears that it is outer joining against the wrong

Re: [sqlalchemy] Raise exception on implicit join

2015-11-24 Thread Jacob Magnusson
Thanks for the great answer Michael! I feel a bit ungrateful to make use of your solution now first, but I had a really stressful period back in July so I kind of forgot about this. I was hoping I could just activate it for all my queries but then I noticed that it also applies to when you're

Re: [sqlalchemy] Raise exception on implicit join

2015-11-24 Thread Mike Bayer
On 11/24/2015 05:54 AM, Jacob Magnusson wrote: > Thanks for the great answer Michael! I feel a bit ungrateful to make use > of your solution now first, but I had a really stressful period back in > July so I kind of forgot about this. > > I was hoping I could just activate it for all my queries