我有一个模型Thing,它可以由几种类型的ThinglikePointyThing和TastyThing. 我有第二个模型,Instance它与 s 一对多相关Thing(一个Instance可能是 single 的类型,但给定的 sThing会有很多)。然后 s 与带有 backref 的 a (每个都有一个但 a有很多s)相关联,以便 a可以调用它的属性来查看它拥有什么。InstanceThingInstancePlayerinstancePlayerplayerInstancePlayer.inventory
一切都很好,但我也有一个模型Place。我希望Places 也拥有Instances ,就像 aPlayer拥有 an一样instance。
最好创建一个Owner与模型链接的Instance模型,然后将其子类化以获取Players 和Places 或我还不知道的 SQLAlchemy 中的一些迄今为止未知的方法?