Re: [sqlalchemy] How can I set table constraints with DeferredReflection?

2014-04-02 Thread Michael Bayer
On Apr 2, 2014, at 5:10 PM, Rob Crowell wrote: > I'm using the ORM and one of my tables does not have a primary key defined. > I am also using DeferredReflection, and I can't seem to figure out how to > defer the PrimaryKeyConstraint until Base.prepare() runs. Any pointers? > > Base = d

[sqlalchemy] How can I set table constraints with DeferredReflection?

2014-04-02 Thread Rob Crowell
I'm using the ORM and one of my tables does not have a primary key defined. I am also using DeferredReflection, and I can't seem to figure out how to defer the PrimaryKeyConstraint until Base.prepare() runs. Any pointers? Base = declarative_base(cls=DeferredReflection) class Person(Ba