Re: [sqlalchemy] sqlalchmey 0.8 stuck on a join with reflected tables

2013-10-12 Thread Michael Bayer
On Oct 12, 2013, at 10:35 PM, Iain Duncan wrote:I set up my table  and my mappers like so:appurl_table = Table("appurls", metadata,     Column('tierid', Integer, ForeignKey('tier.tierid'), primary_key=True ),     Column('groupagentid', Integer, ForeignKey('groupagent.gro

[sqlalchemy] sqlalchmey 0.8 stuck on a join with reflected tables

2013-10-12 Thread Iain Duncan
Hey folks, hit a new error message and the googling is not turning up much, and as I'm new to postgres, I'm frankly over my head. I have a wack of reflected tables and I'm trying to get a join working. The one I'm ultimately after has a composite primary key of 2 different foreign keys and an int (

Re: [sqlalchemy] SQLAlchemy 0.8 issue: with appending items to relationship

2013-10-12 Thread Michael Bayer
On Oct 12, 2013, at 11:54 AM, Marc Van Olmen wrote: > hi, > > Just wanted to quickly report this issue, didn't had time to write unit test > for corning the case: > Was upgrading an 0.4.8 legacy project to 0.8.2 > > Got an SAWarning: This collection has been invalidated in the following case:

Re: [sqlalchemy] SQLAlchemy 0.8 Generates Wrong SQL for self-join

2013-10-12 Thread Michael Bayer
On Oct 12, 2013, at 10:26 AM, Jerry wrote: > SQLAlchemy 0.8 is generating wrong SQL for my simple self-join -- > > class ScheduledJob(Base): > Id = Column('Id', Integer, primary_key=True) > DependentJob1 = Column('DependentJob1', Integer) > > DJ1 = aliased(ScheduledJob) > query = dbses

[sqlalchemy] SQLAlchemy 0.8 issue: with appending items to relationship

2013-10-12 Thread Marc Van Olmen
hi, Just wanted to quickly report this issue, didn't had time to write unit test for corning the case: Was upgrading an 0.4.8 legacy project to 0.8.2 Got an SAWarning: This collection has been invalidated in the following case: Original 0.4.8 code: self._serials.append(MetaSerial(

[sqlalchemy] SQLAlchemy 0.8 Generates Wrong SQL for self-join

2013-10-12 Thread Jerry
SQLAlchemy 0.8 is generating wrong SQL for my simple self-join -- class ScheduledJob(Base): Id = Column('Id', Integer, primary_key=True) DependentJob1 = Column('DependentJob1', Integer) DJ1 = aliased(ScheduledJob) query = dbsession.query(ScheduledJob.Id, DJ1.Id).outerjoin( DJ1, Sc