ACR Rules

  1. Home
  2. Docs
  3. ACR Rules
  4. Architecture (16)
  5. Inheritance should be limited to 2 levels

Inheritance should be limited to 2 levels

Checks if there are too many levels of inheritance present
Using inheritance is an architectural consideration, but it can really affect performance. Mendix creates an extra table per inherited entity. So querying on  an entity with inheritance takes a lot of extra joining. Also when applying xpath access the row check needs to be applied per type, so many OR-ed clauses are added. A well known example to Mansystems is a query that as MxAdmin (without xpath access) is half a page A4 and as a User with xpath access is 30 pages A4! Obviously the query took from 2 seconds to 1 minute on a medium to large database. An obviously this app has been redesigned in the mean time.  
Add a integer that constrains the max depth of inheritance.