Re: [sqlalchemy] Adding a foreign key dynamically

2021-01-11 Thread RexE
OK thank you! I will give it a try. On Tuesday, January 12, 2021 at 11:39:13 AM UTC+8 Mike Bayer wrote: > > > On Mon, Jan 11, 2021, at 10:20 PM, RexE wrote: > > I'm changing my framework to use the SQLAlchemy declarative system > internally. However, I want to keep the API the same. Here is how

Re: [sqlalchemy] Adding a foreign key dynamically

2021-01-11 Thread Mike Bayer
On Mon, Jan 11, 2021, at 10:20 PM, RexE wrote: > I'm changing my framework to use the SQLAlchemy declarative system > internally. However, I want to keep the API the same. Here is how users of my > framework declare a foreign key: > > from myframework import Model, Link > > class Bar(Model)

[sqlalchemy] Adding a foreign key dynamically

2021-01-11 Thread RexE
I'm changing my framework to use the SQLAlchemy declarative system internally. However, I want to keep the API the same. Here is how users of my framework declare a foreign key: from myframework import Model, Link class Bar(Model) class Foo(Model): bar = Link(Bar) At first I thought I