Model inheritance approach with Django's ORM

前端 未结 2 1761
温柔的废话
温柔的废话 2021-01-06 04:53

I want to store events in a web application I am fooling around with and I feel quite unsure about the pros and cons of each respective approach - using inheritance extensiv

2条回答
  •  無奈伤痛
    2021-01-06 05:44

    Flat is better than nested. I don't see that the "deep inheritance" is really buying you anything in this case: I'd go for the flatter model as a simpler, plainer design, with likely better performance characteristics and ease of access.

提交回复
热议问题