Entity is added twice in tree

Hallo everyone,

I’m trying to model something like a file explorer where you have folders (in my models called “Akte”) and files (in my models called “Dokument”). Folders can contain folders and files. The structure should be shown in a tree, so I based my approach on the modeling tutorial for the Tree Modeling. Everything worked as expected until I tried to add a folder into a folder. For this case the folder is added twice in the tree (see the screenshot folder “DCE”); first on the correct position (inside folder “ABC”) and second in the root level (where it shouldn’t be). I’m new in tree modeling and can’t see where the problem lies. So I hope someone can help me here (I hope I attached every model needed). Thanks in advance.
Best regards
Nora

Aktenauswahl_AM.json (4.2 KB)

Akte_FM.json (2.9 KB)

Akte_Dokument_RM.json (1.6 KB)

Dokumentenbaum_TM.json (6.3 KB)

Dokument_FM.json (2.9 KB)

Dokument_DM.json (7.6 KB)

Akte_DM.json (2.8 KB)

Akte_Akte_RM.json (1.7 KB)

Hi @nora-azure-stem

I’m glad to hear that you could get started using the modeling tutorial. There’s a simply modeling fix for this behavior which is to change the Root to:

Akte_DM → Akte_Akte_RM

The reason that this works can be found in the tree modeling documentation:

Roots do not have parents.

By setting the root to Akte_DM → Akte_Akte_RM you query the Akte documents that do not have a parent document.

Hi @malcolm-silver-ice ,
thank you for your help and explanation :slight_smile:
Best regards
Nora