[PonyORM-list] Inheritence

Alexander Kozlovsky alexander.kozlovsky at gmail.com
Tue Jul 8 09:47:04 UTC 2014


On Tue, Jul 8, 2014 at 1:01 PM, Роман Рубан <ryr1986 at gmail.com> wrote:

> I think in this case A and B should be different tables by default
>
>
In the Matthew question, both entities are inherited from the common base
class. There are several ways to represent inheritance in relational model.
Pony uses signle-table inheritance, because this way is the most efficient
in most cases. With signle-table inheritance it is not necessary to perform
join in order to load objects from the database.

It is possible that in future we'll add support to less efficient types of
inheritance, for example to provide compatibility with Django-generated
databases. Then it will be possible to choose if inherited classes should
use the same table or different tables.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </ponyorm-list/attachments/20140708/2e84acf9/attachment.html>


More information about the ponyorm-list mailing list