Re: [sqlalchemy] contains_eager option on polymorphic joined query

2019-03-10 Thread Mike Bayer
this is a bug, for which the "correlate()" workaround I gave you can be used for now. The fix is tracked from https://github.com/sqlalchemy/sqlalchemy/issues/4537 and will be in release 1.3.2. On Sun, Mar 10, 2019 at 10:32 PM Mike Bayer wrote: > > On Sat, Mar 9, 2019 at 10:12 PM wrote: > > >

Re: [sqlalchemy] contains_eager option on polymorphic joined query

2019-03-10 Thread Mike Bayer
On Sat, Mar 9, 2019 at 10:12 PM wrote: > > Ah my bad! I really didn't do good testing. Your reply prompted me to find > the root of the problem and solution though. Posting it here just in case > this is useful to anyone else! > > A gist of the problem I actually had was that I has a

Re: [sqlalchemy] contains_eager option on polymorphic joined query

2019-03-09 Thread jay . chia
Ah my bad! I really didn't do good testing. Your reply prompted me to find the root of the problem and solution though. Posting it here just in case this is useful to anyone else! A gist of the problem I actually had was that I has a column_property in Common defined in terms of the

Re: [sqlalchemy] contains_eager option on polymorphic joined query

2019-03-08 Thread Mike Bayer
On Fri, Mar 8, 2019 at 3:56 PM wrote: > > Hi everyone! > > I am trying to use the contains_eager option on a simple polymorphic query > that looks like: > > class Superclass(): > common_relationship = relationship('Common', ...) > discriminator_field = Column(String...) >

[sqlalchemy] contains_eager option on polymorphic joined query

2019-03-08 Thread jay . chia
Hi everyone! I am trying to use the contains_eager option on a simple polymorphic query that looks like: class Superclass(): common_relationship = relationship('Common', ...) discriminator_field = Column(String...) __mapper_args__ = {'polymorphic_identity': 'superclass',