Skip to content

Commit 1650437

Browse files
committed
Rename Folder_SubFolder association to SubFolder_Folder
1 parent ea039bf commit 1650437

11 files changed

Lines changed: 8 additions & 8 deletions

File tree

content/en/docs/refguide/modeling/domain-model/associations/query-over.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@ This example is for an implementation of folders on a computer, where one folder
1515

1616
{{< figure src="/attachments/refguide/modeling/domain-model/associations/query-over/query-over-example-structure.png" >}}
1717

18-
To implement this, a self-reference to **Folder** is used. The self-reference is an association called **Folder_SubFolder**. This allows you to build a folder structure with unlimited numbers and levels of folders.
18+
To implement this, a self-reference to **Folder** is used. The self-reference is an association called **SubFolder_Folder**. This allows you to build a folder structure with unlimited numbers and levels of folders.
1919

2020
{{% alert color="info" %}}
21-
The association in this case is a one-to-many association, but the same techniques apply to many-to-many or one-to-one associations.
21+
The association in this case is a many-to-one association, but the same techniques apply to many-to-many or one-to-one associations.
2222
{{% /alert %}}
2323

2424
{{< figure src="/attachments/refguide/modeling/domain-model/associations/query-over/self-reference-domain-model.png" >}}
2525

26-
If we create our folder functionality in a module called **QueryOver**, the association **Folder_SubFolder** is described in two ways in the domain model:
26+
If we create our folder functionality in a module called **QueryOver**, the association **SubFolder_Folder** is described in two ways in the domain model:
2727

2828
| Name | Type | Owner | Parent | Child |
2929
| --- | --- | --- | --- | --- |
30-
| Folder_Subfolder | Reference | Default | QueryOver.Folder | QueryOver.Folder |
30+
| SubFolder_Folder | Reference | Default | QueryOver.Folder | QueryOver.Folder |
3131

3232
* Multiplicity: One 'Folder' object is associated with multiple 'Folder' objects
3333

3434
The **Child** is the **Owner** of the association - in other words, the association is always updated through the child.
3535

3636
{{< figure src="/attachments/refguide/modeling/domain-model/associations/query-over/query-over-association.png" >}}
3737

38-
There are six folders in the example above, and the database is structured and the attributes filled as shown below. In the **Folder_SubFolder** table, the **ChildFolderID** is shown on the left as it is the owner of the association.
38+
There are six folders in the example above, and the database is structured and the attributes filled as shown below. In the **SubFolder_Folder** table, the **ChildFolderID** is shown on the left as it is the owner of the association.
3939

4040
{{< figure src="/attachments/refguide/modeling/domain-model/associations/query-over/query-over-example-database.png" >}}
4141

@@ -45,7 +45,7 @@ For more information on how domain models are implemented in databases, see the
4545

4646
If you have the $ChosenFolder object available in your microflow you can easily retrieve the subfolder(s). Each association has a right side (parent in the association) and a left side (child or owner of the association). The platform reads each association and determines whether the parent is equal to the $ChosenFolder.
4747

48-
This is implemented using the following XPath constraint: `[QueryOver.Folder_SubFolder=$ChosenFolder]`. The XPath constraint is read from right to left, with the resulting Folder(s) being the result. This is key to how you should interpret which direction you are following the association.
48+
This is implemented using the following XPath constraint: `[QueryOver.SubFolder_Folder=$ChosenFolder]`. The XPath constraint is read from right to left, with the resulting Folder(s) being the result. This is key to how you should interpret which direction you are following the association.
4949

5050
{{< figure src="/attachments/refguide/modeling/domain-model/associations/query-over/query-over-retrieve-normal.png" width="400" >}}
5151

@@ -65,7 +65,7 @@ Use the expression `[reversed ()]` to instruct Mendix to read the constraint in
6565
The `[reversed()]` expression can only be applied on self-references. When an association is between two different object types, the platform will be able to determine the direction of the join automatically.
6666
{{% /alert %}}
6767

68-
In our example, we want to find the folder which is the parent of $ChosenFolder. Now, the query becomes `[QueryOver.Folder_SubFolder [reversed ()]=$ChosenFolder]`. Instead of reading the association from right to left (Parent to Child), the association is read from left to right.
68+
In our example, we want to find the folder which is the parent of $ChosenFolder. Now, the query becomes `[QueryOver.SubFolder_Folder [reversed ()]=$ChosenFolder]`. Instead of reading the association from right to left (Parent to Child), the association is read from left to right.
6969

7070
{{< figure src="/attachments/refguide/modeling/domain-model/associations/query-over/query-over-retrieve-reversed.png" width="400" >}}
7171

@@ -87,7 +87,7 @@ Say, for example, that each folder can contain multiple files, associated with t
8787

8888
You want to retrieve all the files in the parent folder of the folder object $ChosenFolder.
8989

90-
Use the constraint `[QueryOver.File_Folder/QueryOver.Folder/QueryOver.Folder_SubFolder [reversed ()]=$ChosenFolder]` to return all the **File** objects associated with the **Folder** which is associated (as parent) with the **Folder** which is the same as **$ChosenFolder**.
90+
Use the constraint `[QueryOver.File_Folder/QueryOver.Folder/QueryOver.SubFolder_Folder [reversed ()]=$ChosenFolder]` to return all the **File** objects associated with the **Folder** which is associated (as parent) with the **Folder** which is the same as **$ChosenFolder**.
9191

9292
{{< figure src="/attachments/refguide/modeling/domain-model/associations/query-over/query-over-retrieve-complex.png" >}}
9393

-73 KB
Loading
2.84 KB
Loading
18.6 KB
Loading
-22.3 KB
Loading
13.8 KB
Loading
14.8 KB
Loading
13.4 KB
Loading
16.8 KB
Loading
21.8 KB
Loading

0 commit comments

Comments
 (0)