Re: [sqlalchemy] Auto-alias on polymorphic_identity tables

2018-02-12 Thread Mike Bayer
On Mon, Feb 12, 2018 at 5:14 AM, Stanislav Lobanov wrote: > Hello, i'm supporting legacy database, and using such models (code contains > examples of my problem, keep reading): > > class Product: # This table is never used straightforward in queries > > type =

[sqlalchemy] Auto-alias on polymorphic_identity tables

2018-02-12 Thread Stanislav Lobanov
Hello, i'm supporting legacy database, and using such models (code contains examples of my problem, keep reading): class Product: # This table is never used straightforward in queries type = Column(db.Integer) name = Column(db.String) TYPE_GUITARS = 1 TYPE_DRUMS = 2