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

Hi community, As best practice Mendix recommends not go deeper than 2 levels of inheritence (specializations) for performance reasons ( Does that also apply for non-persistent entities? And if so: why? Regards, Johan
1 answers

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 –