Multiple levels of inheritance on non-persistent entities: bad practice?

0
Hi community, As best practice Mendix recommends not go deeper than 2 levels of inheritence (specializations) for performance reasons (https://docs.mendix.com/howto/general/dev-best-practices). Does that also apply for non-persistent entities? And if so: why? Regards, Johan
asked
1 answers
3

Short answer: This does not apply to non-persistent entities.

Explaination: For persistent entities, the problem is the database design. Each level of inheritance adds an extra table. When you retrieve an object, then all the tables need to be queried every time for access rules. This is where performance really starts to suffer as more levels are added. Bart Tolen sums it up nicely here – https://forum.mendix.com/link/questions/8846

-Andrej

answered