Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
Polymorphism¶
There are different methods to implement Polymorphism. in a relational database. To use Martin Frowler’s classification:
Single Table Inheritance: corresponds to Django’s single-table model inheritance.
Class Table Inheritance corresponds to Django’s multi-table model inheritance and Lino adds some tools for using it: Multi-table inheritance.
Lino also provides methods to make the implementation choice itself transparent (we are working on it: https://gitlab.com/lino-framework/lino/blob/master/docs/tickets/72)
Polymorphism without using MTI:
See
lino.modlib.partners
for example.lino.core.model.Model.get_typed_instance()