python - SQLAlchemy variable relationship -


i'm unclear on how configure sqlalchemy following scenario:

  • several tables of varying nature.
  • all tables need reference one-to-many notes table
  • would have 1 notes table, servicing these other tables, relationship based on parent_type column in notes table

table diagram

for example: if relation_type items, relationship_id refers pk of table_items table. if relation_type orders relationship_id refer pk of table_orders

imo, problem describe best solved using generic associations example.
closest example of 3 examples listed discriminator_on_association.py


Comments

Popular posts from this blog

c# - Is it possible to remove an existing registration from Autofac container builder? -

asp.net - Error '2035' ('MQRC_NOT_AUTHORIZED') While Connecting to MQ -