Inheritance and performance

1
I have a question about inheritance and performance. For a project I need to be able to import almost a complete domain model via an Excel. This requires multiple import templates for the same file and to be able to set all associations right I want to set associations between the import file entity and other entities in my domain model. I could simply associate my import file entity with all other entities, but this would render the domain model unreadable. So I was thinking to make an ImportItem entity and have all the other entities inherit from this item. I was however wondering if this will impact performance?   The generic entity will never be shown in the UI and the attributes/association of the generic entity will never be used when the specialized entity is shown or retrieved. Will Mendix still always join the two tables when I do something with the specialized entity or is Mendix smart enough to only join the tables when I actually ask for something from the generic entity?   Edit: For those reading this question later, the solution I went with is a non-persistant "ImportItem" object, with an association to the Import file. And then looping over those to create my real items. This because the performance of the import is far less important than the performance of the imported objects in the app.
asked
3 answers
1

It will impact performance (because you keep doing joins which aren't really necessary), see this article for your second question.

answered
0

It is not recommended to let all entities inherit from an ImportIttem entity. It will impact performance and prevent necessary inheritance in your model.

You will still need specific Excel import templates per entity.

 

Edit 1:  You can get a list of imported items when you pass a parent object.

Edit 2: You can make your own lists of data with an extra attribute and fill that from excel. In that case you need to pre-process the excel file.

answered