Self-Reference Domain Model

Hi everyone,  I’m trying to build a hierarchy of documents in Mendix using a Self-Reference: No matter what i do, i can’t call a list with more than one object from the parent...What am I doing wrong?!? Best, Tom
3 answers

Check if this document helps you:

There is something called reversed() which can be used in self-referencing. May be in your case, you might need this. 

Problem with self referencing is, parent and child are same, so, it might become bit hard to get the associated objects if your parent is actually different than what you expect. 

In those cases, reversed will help you.


As you data is non-persistant retrieving through a self-reference can be challenging.

you could setup your domain model like this, this creates insight and cannot return a parent when retrieving a child.


If you are having trouble retrieving the information, it is always handy to try with a datasource microflow where you have more control on the way of retrieving the information. Maybe try that.

On the other hand check the navigability of your association (double click on the association in your domain model). This helps with understanding why you might not be able to easily retrieve the list.