Re: [sqlalchemy] (OperationalError) no such column when child class uses different name for primary key in polymorphic relationship and a subselect issued

2015-11-23 Thread Martin Pengelly-Phillips
Thanks Michael. On Saturday, 21 November 2015 22:35:14 UTC, Michael Bayer wrote: > > > > On 11/20/2015 12:20 PM, Martin Pengelly-Phillips wrote: > > Hi there, > > > > Using SQLAlchemy 1.0.9 > > > > I am dealing with some legacy code and came across the following issue. > > It appears that

Re: [sqlalchemy] (OperationalError) no such column when child class uses different name for primary key in polymorphic relationship and a subselect issued

2015-11-21 Thread Mike Bayer
On 11/20/2015 12:20 PM, Martin Pengelly-Phillips wrote: > Hi there, > > Using SQLAlchemy 1.0.9 > > I am dealing with some legacy code and came across the following issue. > It appears that in a polymorphic relationship SQLAlchemy is not able to > correctly determine what to load for a

[sqlalchemy] (OperationalError) no such column when child class uses different name for primary key in polymorphic relationship and a subselect issued

2015-11-20 Thread Martin Pengelly-Phillips
Hi there, Using SQLAlchemy 1.0.9 I am dealing with some legacy code and came across the following issue. It appears that in a polymorphic relationship SQLAlchemy is not able to correctly determine what to load for a relationship when using a subselect (due to limit on query) and child class