Re: [sqlalchemy] Weird bug

2011-09-05 Thread Michael Bayer
The fix for this is spreading out into some deeper code changes, all for the better but it's tipping past the point I'd want to put this into 0.6.9, so for the moment I'm going to keep this in the 0.7 series. On Aug 18, 2011, at 4:56 PM, Michael Bayer wrote: On Aug 18, 2011, at 4:24 PM,

[sqlalchemy] Weird bug

2011-08-18 Thread brianhawthorne
Hello, I have found a case where instantiating a select statement during the declaration of the parent class in a one-to-many pair can cause a downstream failure to generate well formed sql when performing a query with a subqueryload option. I've boiled down a minimal example (pasted below) which

Re: [sqlalchemy] Weird bug

2011-08-18 Thread Michael Bayer
the issue is quite simple as can be seen in this demonstration: from sqlalchemy import * # two columns. Nothing up my sleeve ! c1 = Column('c1', Integer) c2 = Column('c2', Integer) # put one of them into a Select. # generate _from_objects collection of c1 too early s = select([c1]) t =

Re: [sqlalchemy] Weird bug

2011-08-18 Thread Michael Bayer
On Aug 18, 2011, at 4:24 PM, Michael Bayer wrote: However, the original select() is still wrong. _from_objects gave it the wrong data, period.How to guard against this issue, a potentially expensive reorg of Select internals. As well as future issues of this sort, using Column