Re: [sqlalchemy] Single table inheritance and __table_args__

2013-04-09 Thread Michael Bayer
this feature should be added and is http://www.sqlalchemy.org/trac/ticket/2700, here's a workaround for now: from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import declarative_base class FixTableArgs(object): @classmethod def __declare_last__(cls):

[sqlalchemy] Single table inheritance and __table_args__

2013-04-09 Thread Gombas, Gabor (IT)
Hi, What is the recommended method of specifying constraints on columns added by a subclass using single-table inheritance? This does not work, I get a KeyError for "col_a": class BaseClass(Base) __table__ = "base" __table_args__ = (Index("base_col"), UniqueConstrain