diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod
index 43dd6f35dab0656b40f633e2029f3d37cccc1f85..4c3d0ca72f7b95546749cc23a48dd112fcffb1f2 100644
--- a/aliasDefinition/Data_alias/Data_alias.aod
+++ b/aliasDefinition/Data_alias/Data_alias.aod
@@ -108,9 +108,9 @@
                 <name>DATE_EDIT</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="false" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -122,9 +122,9 @@
                 <name>DATE_NEW</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="true" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -253,7 +253,7 @@
                 <scale v="0" />
                 <notNull v="false" />
                 <isUnique v="false" />
-                <index v="false" />
+                <index v="true" />
                 <title></title>
                 <description></description>
               </entityFieldDb>
@@ -317,9 +317,9 @@
                 <name>DATE_EDIT</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="false" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -345,9 +345,9 @@
                 <name>DATE_NEW</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="true" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -516,9 +516,9 @@
                 <name>DATE_EDIT</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="false" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -544,9 +544,9 @@
                 <name>DATE_NEW</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="true" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -739,7 +739,7 @@
                 <scale v="0" />
                 <notNull v="true" />
                 <isUnique v="false" />
-                <index v="false" />
+                <index v="true" />
                 <title></title>
                 <description></description>
                 <dependencies>
@@ -767,9 +767,9 @@
                 <name>DATE_EDIT</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="false" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -795,9 +795,9 @@
                 <name>DATE_NEW</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="true" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -860,7 +860,7 @@
                 <scale v="0" />
                 <notNull v="false" />
                 <isUnique v="false" />
-                <index v="false" />
+                <index v="true" />
                 <title></title>
                 <description></description>
               </entityFieldDb>
@@ -873,7 +873,7 @@
                 <scale v="0" />
                 <notNull v="false" />
                 <isUnique v="false" />
-                <index v="false" />
+                <index v="true" />
                 <title></title>
                 <description></description>
                 <dependencies>
@@ -1297,9 +1297,9 @@
                 <name>DATE_EDIT</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="false" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -1325,9 +1325,9 @@
                 <name>DATE_NEW</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="true" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -2138,9 +2138,9 @@
                 <name>DATE_EDIT</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="false" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -2166,9 +2166,9 @@
                 <name>DATE_NEW</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="true" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -3467,9 +3467,9 @@
                 <name>DATE_EDIT</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="false" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -3495,9 +3495,9 @@
                 <name>DATE_NEW</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="true" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -4047,7 +4047,7 @@
                 <scale v="0" />
                 <notNull v="false" />
                 <isUnique v="false" />
-                <index v="false" />
+                <index v="true" />
                 <documentation></documentation>
                 <title></title>
                 <description></description>
@@ -4117,7 +4117,7 @@
                 <scale v="0" />
                 <notNull v="false" />
                 <isUnique v="false" />
-                <index v="false" />
+                <index v="true" />
                 <documentation></documentation>
                 <title></title>
                 <description></description>
@@ -4706,9 +4706,9 @@
                 <name>DATE_EDIT</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="false" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -4734,9 +4734,9 @@
                 <name>DATE_NEW</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="true" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -4814,7 +4814,7 @@
                 <scale v="0" />
                 <notNull v="true" />
                 <isUnique v="false" />
-                <index v="false" />
+                <index v="true" />
                 <documentation></documentation>
                 <title></title>
                 <description></description>
@@ -4837,9 +4837,9 @@
                 <name>DATE_EDIT</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="false" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -4851,9 +4851,9 @@
                 <name>DATE_NEW</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="91" />
-                <size v="10" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="true" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -4931,7 +4931,7 @@
                 <scale v="0" />
                 <notNull v="true" />
                 <isUnique v="false" />
-                <index v="false" />
+                <index v="true" />
                 <documentation></documentation>
                 <title></title>
                 <description></description>
@@ -5137,7 +5137,7 @@
                 <scale v="0" />
                 <notNull v="true" />
                 <isUnique v="false" />
-                <index v="false" />
+                <index v="true" />
                 <documentation></documentation>
                 <title></title>
                 <description></description>
@@ -5254,7 +5254,7 @@
                 <scale v="0" />
                 <notNull v="true" />
                 <isUnique v="false" />
-                <index v="false" />
+                <index v="true" />
                 <documentation></documentation>
                 <title></title>
                 <description></description>
@@ -5419,7 +5419,7 @@
                 <scale v="0" />
                 <notNull v="true" />
                 <isUnique v="false" />
-                <index v="false" />
+                <index v="true" />
                 <documentation></documentation>
                 <title></title>
                 <description></description>
@@ -5514,6 +5514,20 @@
                 <title></title>
                 <description></description>
               </entityFieldDb>
+              <entityFieldDb>
+                <name>HIERARCHY</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="4" />
+                <size v="10" />
+                <scale v="0" />
+                <notNull v="true" />
+                <isUnique v="false" />
+                <index v="false" />
+                <documentation></documentation>
+                <title></title>
+                <description></description>
+              </entityFieldDb>
             </entityFields>
           </entityDb>
           <entityDb>
diff --git a/entity/AttributeRelationTree_entity/AttributeRelationTree_entity.aod b/entity/AttributeRelationTree_entity/AttributeRelationTree_entity.aod
index 8728871cf3791e830855a698c09771301960bdfe..bb483a46acd306a1096488ef3a58288d6e768fd0 100644
--- a/entity/AttributeRelationTree_entity/AttributeRelationTree_entity.aod
+++ b/entity/AttributeRelationTree_entity/AttributeRelationTree_entity.aod
@@ -1,90 +1,90 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1">
-  <name>AttributeRelationTree_entity</name>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <recordContainer>jdito</recordContainer>
-  <entityFields>
-    <entityProvider>
-      <name>#PROVIDER</name>
-    </entityProvider>
-    <entityField>
-      <name>PARENT_ID</name>
-    </entityField>
-    <entityField>
-      <name>TITLE</name>
-    </entityField>
-    <entityField>
-      <name>UID</name>
-    </entityField>
-    <entityParameter>
-      <name>ObjectType_param</name>
-      <expose v="true" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityParameter>
-      <name>ObjectRowId_param</name>
-      <expose v="true" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityProvider>
-      <name>TreeProvider</name>
-      <fieldType>DEPENDENCY_IN</fieldType>
-      <dependencies>
-        <entityDependency>
-          <name>e0a7a4bc-ec7f-4f09-9b94-cbeb328cd7b8</name>
-          <entityName>Organisation_entity</entityName>
-          <fieldName>AttributeTree</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>f29d91fe-2537-486f-b9de-44065a7790d4</name>
-          <entityName>Person_entity</entityName>
-          <fieldName>AttributeTree</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>445c1bd7-4e72-4ab7-a5b1-cc77924eb562</name>
-          <entityName>Product_entity</entityName>
-          <fieldName>AttributeTree</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>4498139f-067c-4cca-b122-d9bc9100c53d</name>
-          <entityName>Activity_entity</entityName>
-          <fieldName>AttributeTree</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>d6d5f9aa-4582-4ec5-9381-394a38a726e8</name>
-          <entityName>Offer_entity</entityName>
-          <fieldName>AttributeTree</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>b728166d-a74f-4ca1-8ce7-7e57032f2a7d</name>
-          <entityName>Contract_entity</entityName>
-          <fieldName>AttributeTree</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>3921c712-d15c-4941-b04d-44f4536dc404</name>
-          <entityName>Employee_entity</entityName>
-          <fieldName>AttributeTree</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-      </dependencies>
-    </entityProvider>
-  </entityFields>
-  <recordContainers>
-    <jDitoRecordContainer>
-      <name>jdito</name>
-      <jDitoRecordAlias>Data_alias</jDitoRecordAlias>
-      <contentProcess>%aditoprj%/entity/AttributeRelationTree_entity/recordcontainers/jdito/contentProcess.js</contentProcess>
-      <recordFields>
-        <element>UID.value</element>
-        <element>PARENT_ID.value</element>
-        <element>TITLE.value</element>
-      </recordFields>
-    </jDitoRecordContainer>
-  </recordContainers>
-</entity>
+<?xml version="1.0" encoding="UTF-8"?>
+<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1">
+  <name>AttributeRelationTree_entity</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <recordContainer>jdito</recordContainer>
+  <entityFields>
+    <entityProvider>
+      <name>#PROVIDER</name>
+    </entityProvider>
+    <entityField>
+      <name>PARENT_ID</name>
+    </entityField>
+    <entityField>
+      <name>TITLE</name>
+    </entityField>
+    <entityField>
+      <name>UID</name>
+    </entityField>
+    <entityParameter>
+      <name>ObjectType_param</name>
+      <expose v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityParameter>
+      <name>ObjectRowId_param</name>
+      <expose v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityProvider>
+      <name>TreeProvider</name>
+      <fieldType>DEPENDENCY_IN</fieldType>
+      <dependencies>
+        <entityDependency>
+          <name>e0a7a4bc-ec7f-4f09-9b94-cbeb328cd7b8</name>
+          <entityName>Organisation_entity</entityName>
+          <fieldName>AttributeTree</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>f29d91fe-2537-486f-b9de-44065a7790d4</name>
+          <entityName>Person_entity</entityName>
+          <fieldName>AttributeTree</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>445c1bd7-4e72-4ab7-a5b1-cc77924eb562</name>
+          <entityName>Product_entity</entityName>
+          <fieldName>AttributeTree</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>4498139f-067c-4cca-b122-d9bc9100c53d</name>
+          <entityName>Activity_entity</entityName>
+          <fieldName>AttributeTree</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>d6d5f9aa-4582-4ec5-9381-394a38a726e8</name>
+          <entityName>Offer_entity</entityName>
+          <fieldName>AttributeTree</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>b728166d-a74f-4ca1-8ce7-7e57032f2a7d</name>
+          <entityName>Contract_entity</entityName>
+          <fieldName>AttributeTree</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>3921c712-d15c-4941-b04d-44f4536dc404</name>
+          <entityName>Employee_entity</entityName>
+          <fieldName>AttributeTree</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+      </dependencies>
+    </entityProvider>
+  </entityFields>
+  <recordContainers>
+    <jDitoRecordContainer>
+      <name>jdito</name>
+      <jDitoRecordAlias>Data_alias</jDitoRecordAlias>
+      <contentProcess>%aditoprj%/entity/AttributeRelationTree_entity/recordcontainers/jdito/contentProcess.js</contentProcess>
+      <recordFields>
+        <element>UID.value</element>
+        <element>PARENT_ID.value</element>
+        <element>TITLE.value</element>
+      </recordFields>
+    </jDitoRecordContainer>
+  </recordContainers>
+</entity>
diff --git a/entity/EmployeeRole_entity/EmployeeRole_entity.aod b/entity/EmployeeRole_entity/EmployeeRole_entity.aod
index bc87a355559270d38dc8c6f91cfe448a6cc87634..db73c36b4c1d88cd7163e2be896457168deb3fe4 100644
--- a/entity/EmployeeRole_entity/EmployeeRole_entity.aod
+++ b/entity/EmployeeRole_entity/EmployeeRole_entity.aod
@@ -1,56 +1,56 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1">
-  <name>EmployeeRole_entity</name>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <recordContainer>jdito</recordContainer>
-  <entityFields>
-    <entityProvider>
-      <name>#PROVIDER</name>
-    </entityProvider>
-    <entityField>
-      <name>UID</name>
-    </entityField>
-    <entityParameter>
-      <name>UserTitle_param</name>
-      <expose v="true" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityProvider>
-      <name>EmployeeRoles</name>
-      <fieldType>DEPENDENCY_IN</fieldType>
-      <dependencies>
-        <entityDependency>
-          <name>3bcec57a-7165-4773-9253-5ecab26ee3f4</name>
-          <entityName>Employee_entity</entityName>
-          <fieldName>EmployeeRoles</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-      </dependencies>
-      <children>
-        <entityParameter>
-          <name>UserTitle_param</name>
-          <expose v="true" />
-        </entityParameter>
-      </children>
-    </entityProvider>
-    <entityField>
-      <name>ROLE</name>
-      <title>Role</title>
-      <possibleItemsProcess>%aditoprj%/entity/EmployeeRole_entity/entityfields/role/possibleItemsProcess.js</possibleItemsProcess>
-    </entityField>
-  </entityFields>
-  <recordContainers>
-    <jDitoRecordContainer>
-      <name>jdito</name>
-      <jDitoRecordAlias>Data_alias</jDitoRecordAlias>
-      <contentProcess>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/contentProcess.js</contentProcess>
-      <onInsert>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onInsert.js</onInsert>
-      <onUpdate>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onUpdate.js</onUpdate>
-      <onDelete>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onDelete.js</onDelete>
-      <recordFields>
-        <element>UID.value</element>
-        <element>ROLE.value</element>
-      </recordFields>
-    </jDitoRecordContainer>
-  </recordContainers>
-</entity>
+<?xml version="1.0" encoding="UTF-8"?>
+<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1">
+  <name>EmployeeRole_entity</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <recordContainer>jdito</recordContainer>
+  <entityFields>
+    <entityProvider>
+      <name>#PROVIDER</name>
+    </entityProvider>
+    <entityField>
+      <name>UID</name>
+    </entityField>
+    <entityParameter>
+      <name>UserTitle_param</name>
+      <expose v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityProvider>
+      <name>EmployeeRoles</name>
+      <fieldType>DEPENDENCY_IN</fieldType>
+      <dependencies>
+        <entityDependency>
+          <name>3bcec57a-7165-4773-9253-5ecab26ee3f4</name>
+          <entityName>Employee_entity</entityName>
+          <fieldName>EmployeeRoles</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+      </dependencies>
+      <children>
+        <entityParameter>
+          <name>UserTitle_param</name>
+          <expose v="true" />
+        </entityParameter>
+      </children>
+    </entityProvider>
+    <entityField>
+      <name>ROLE</name>
+      <title>Role</title>
+      <possibleItemsProcess>%aditoprj%/entity/EmployeeRole_entity/entityfields/role/possibleItemsProcess.js</possibleItemsProcess>
+    </entityField>
+  </entityFields>
+  <recordContainers>
+    <jDitoRecordContainer>
+      <name>jdito</name>
+      <jDitoRecordAlias>Data_alias</jDitoRecordAlias>
+      <contentProcess>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/contentProcess.js</contentProcess>
+      <onInsert>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onInsert.js</onInsert>
+      <onUpdate>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onUpdate.js</onUpdate>
+      <onDelete>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onDelete.js</onDelete>
+      <recordFields>
+        <element>UID.value</element>
+        <element>ROLE.value</element>
+      </recordFields>
+    </jDitoRecordContainer>
+  </recordContainers>
+</entity>
diff --git a/entity/EmployeeRole_entity/recordcontainers/jdito/contentProcess.js b/entity/EmployeeRole_entity/recordcontainers/jdito/contentProcess.js
index 5e4ff916b039af3ae7779f072503a419b2c4c960..d39a3cf15fb32ae74c737f572788ed07720a257c 100644
--- a/entity/EmployeeRole_entity/recordcontainers/jdito/contentProcess.js
+++ b/entity/EmployeeRole_entity/recordcontainers/jdito/contentProcess.js
@@ -1,11 +1,11 @@
-import("system.result");
-import("system.vars");
-import("system.tools");
-
-var roles = [];
-var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param");
-
-if (userTitle && tools.existUsers(userTitle))
-    roles = tools.getRoles(userTitle).map(function (role) {return [role, role]});
-
+import("system.result");
+import("system.vars");
+import("system.tools");
+
+var roles = [];
+var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param");
+
+if (userTitle && tools.existUsers(userTitle))
+    roles = tools.getRoles(userTitle).map(function (role) {return [role, role]});
+
 result.object(roles);
\ No newline at end of file
diff --git a/entity/EmployeeRole_entity/recordcontainers/jdito/onDelete.js b/entity/EmployeeRole_entity/recordcontainers/jdito/onDelete.js
index cb067aab6831890bb3c9e05f1f4c8396c962d312..1ac230e6252328d3f455e833dc5db787c34d9fe4 100644
--- a/entity/EmployeeRole_entity/recordcontainers/jdito/onDelete.js
+++ b/entity/EmployeeRole_entity/recordcontainers/jdito/onDelete.js
@@ -1,19 +1,19 @@
-import("system.result");
-import("system.vars");
-import("system.tools");
-
-var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param");
-var role = vars.get("$field.UID");
-
-if (userTitle)
-{    
-    var user = tools.getUser(userTitle);
-    var roles = tools.getRoles(userTitle);
-    roles = roles.filter(function (row)
-    {
-        return row != role;
-    });
-    user[tools.ROLES] = roles;
-    
-    tools.updateUser(user);
+import("system.result");
+import("system.vars");
+import("system.tools");
+
+var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param");
+var role = vars.get("$field.UID");
+
+if (userTitle)
+{    
+    var user = tools.getUser(userTitle);
+    var roles = tools.getRoles(userTitle);
+    roles = roles.filter(function (row)
+    {
+        return row != role;
+    });
+    user[tools.ROLES] = roles;
+    
+    tools.updateUser(user);
 }
\ No newline at end of file
diff --git a/entity/EmployeeRole_entity/recordcontainers/jdito/onInsert.js b/entity/EmployeeRole_entity/recordcontainers/jdito/onInsert.js
index cd847798b8185ce26d821b1637726d6ff6e3284c..258b1455824907ef5831d1b350b843da2330aa37 100644
--- a/entity/EmployeeRole_entity/recordcontainers/jdito/onInsert.js
+++ b/entity/EmployeeRole_entity/recordcontainers/jdito/onInsert.js
@@ -1,23 +1,23 @@
-import("system.result");
-import("system.vars");
-import("system.tools");
-
-var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param");
-var role = vars.get("$field.ROLE");
-
-if (userTitle)
-{    
-    var user = tools.getUser(userTitle);
-    var roles = tools.getRoles(userTitle);
-    var roleObj = {};
-    roles = [role].concat(roles)
-        .filter(function (role) 
-        {
-            var exists = role in roleObj;
-            roleObj[role] = true;
-            return !exists;
-        });
-    user[tools.ROLES] = roles;
-    
-    tools.updateUser(user);
+import("system.result");
+import("system.vars");
+import("system.tools");
+
+var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param");
+var role = vars.get("$field.ROLE");
+
+if (userTitle)
+{    
+    var user = tools.getUser(userTitle);
+    var roles = tools.getRoles(userTitle);
+    var roleObj = {};
+    roles = [role].concat(roles)
+        .filter(function (role) 
+        {
+            var exists = role in roleObj;
+            roleObj[role] = true;
+            return !exists;
+        });
+    user[tools.ROLES] = roles;
+    
+    tools.updateUser(user);
 }
\ No newline at end of file
diff --git a/entity/EmployeeRole_entity/recordcontainers/jdito/onUpdate.js b/entity/EmployeeRole_entity/recordcontainers/jdito/onUpdate.js
index ae08df85d869504a918c2b71140f22bdc5df8459..338f14eb0341a000ce6e5a21425d633a9d37478a 100644
--- a/entity/EmployeeRole_entity/recordcontainers/jdito/onUpdate.js
+++ b/entity/EmployeeRole_entity/recordcontainers/jdito/onUpdate.js
@@ -1,25 +1,25 @@
-import("system.result");
-import("system.vars");
-import("system.tools");
-
-var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param");
-var oldRole = vars.get("$field.UID");
-var newRole = vars.get("$field.ROLE");
-
-if (userTitle && oldRole != newRole)
-{    
-    var user = tools.getUser(userTitle);
-    var roles = tools.getRoles(userTitle);
-    var roleObj = {};
-    roleObj[oldRole] = true;
-    roles = [newRole].concat(roles)
-        .filter(function (role) 
-        {
-            var exists = role in roleObj;
-            roleObj[role] = true;
-            return !exists;
-        });
-    user[tools.ROLES] = roles;
-    
-    tools.updateUser(user);
+import("system.result");
+import("system.vars");
+import("system.tools");
+
+var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param");
+var oldRole = vars.get("$field.UID");
+var newRole = vars.get("$field.ROLE");
+
+if (userTitle && oldRole != newRole)
+{    
+    var user = tools.getUser(userTitle);
+    var roles = tools.getRoles(userTitle);
+    var roleObj = {};
+    roleObj[oldRole] = true;
+    roles = [newRole].concat(roles)
+        .filter(function (role) 
+        {
+            var exists = role in roleObj;
+            roleObj[role] = true;
+            return !exists;
+        });
+    user[tools.ROLES] = roles;
+    
+    tools.updateUser(user);
 }
\ No newline at end of file
diff --git a/entity/Employee_entity/Employee_entity.aod b/entity/Employee_entity/Employee_entity.aod
index 968d2fb2edaeec1a3a80883ab5ef4707dda7ec39..6ec492b15bb907b1f524c8cef7f0e28251693f33 100644
--- a/entity/Employee_entity/Employee_entity.aod
+++ b/entity/Employee_entity/Employee_entity.aod
@@ -1,280 +1,280 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1">
-  <name>Employee_entity</name>
-  <title>Employee</title>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <onValidation>%aditoprj%/entity/Employee_entity/onValidation.js</onValidation>
-  <afterOperatingState>%aditoprj%/entity/Employee_entity/afterOperatingState.js</afterOperatingState>
-  <iconId>VAADIN:GROUP</iconId>
-  <titleProcess>%aditoprj%/entity/Employee_entity/titleProcess.js</titleProcess>
-  <recordContainer>jdito</recordContainer>
-  <entityFields>
-    <entityProvider>
-      <name>#PROVIDER</name>
-      <lookupIdfield>CONTACT_ID</lookupIdfield>
-    </entityProvider>
-    <entityField>
-      <name>UID</name>
-      <title>Username</title>
-      <mandatory v="true" />
-      <onValidation>%aditoprj%/entity/Employee_entity/entityfields/uid/onValidation.js</onValidation>
-    </entityField>
-    <entityField>
-      <name>TITLE_ORIGINAL</name>
-      <description>the original username, this is required to update the correct user when the username is changed</description>
-      <searchable v="false" />
-    </entityField>
-    <entityField>
-      <name>CONTACT_ID</name>
-      <title>Person</title>
-      <consumer>Contacts</consumer>
-      <linkedContext>Person</linkedContext>
-      <mandatory v="true" />
-      <onValidation>%aditoprj%/entity/Employee_entity/entityfields/contact_id/onValidation.js</onValidation>
-    </entityField>
-    <entityField>
-      <name>FIRSTNAME</name>
-      <title>Firstname</title>
-      <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/firstname/valueProcess.js</valueProcess>
-    </entityField>
-    <entityField>
-      <name>LASTNAME</name>
-      <title>Lastname</title>
-      <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/lastname/valueProcess.js</valueProcess>
-    </entityField>
-    <entityField>
-      <name>ISACTIVE</name>
-      <title>Active</title>
-      <contentType>BOOLEAN</contentType>
-      <possibleItemsProcess>%aditoprj%/entity/Employee_entity/entityfields/isactive/possibleItemsProcess.js</possibleItemsProcess>
-      <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/isactive/valueProcess.js</valueProcess>
-    </entityField>
-    <entityField>
-      <name>EMAIL_ADDRESS</name>
-      <title>Email</title>
-      <mandatory v="true" />
-    </entityField>
-    <entityField>
-      <name>PASSWORD</name>
-      <title>Password</title>
-      <contentType>PASSWORD</contentType>
-      <mandatoryProcess>%aditoprj%/entity/Employee_entity/entityfields/password/mandatoryProcess.js</mandatoryProcess>
-      <searchable v="false" />
-      <stateProcess>%aditoprj%/entity/Employee_entity/entityfields/password/stateProcess.js</stateProcess>
-    </entityField>
-    <entityField>
-      <name>CONFIRM_PASSWORD</name>
-      <title>Confirm password</title>
-      <contentType>PASSWORD</contentType>
-      <mandatoryProcess>%aditoprj%/entity/Employee_entity/entityfields/confirm_password/mandatoryProcess.js</mandatoryProcess>
-      <searchable v="false" />
-      <stateProcess>%aditoprj%/entity/Employee_entity/entityfields/confirm_password/stateProcess.js</stateProcess>
-    </entityField>
-    <entityActionField>
-      <name>setPassword</name>
-      <fieldType>ACTION</fieldType>
-      <title>Set password</title>
-      <onActionProcess>%aditoprj%/entity/Employee_entity/entityfields/setpassword/onActionProcess.js</onActionProcess>
-      <iconId>VAADIN:PASSWORD</iconId>
-    </entityActionField>
-    <entityParameter>
-      <name>PasswordChange_param</name>
-      <expose v="true" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityParameter>
-      <name>OnlyActives_param</name>
-      <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/onlyactives_param/valueProcess.js</valueProcess>
-      <expose v="true" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityConsumer>
-      <name>Contacts</name>
-      <fieldType>DEPENDENCY_OUT</fieldType>
-      <dependency>
-        <name>dependency</name>
-        <entityName>Person_entity</entityName>
-        <fieldName>#PROVIDER</fieldName>
-      </dependency>
-    </entityConsumer>
-    <entityConsumer>
-      <name>Attributes</name>
-      <title>Attributes</title>
-      <fieldType>DEPENDENCY_OUT</fieldType>
-      <dependency>
-        <name>dependency</name>
-        <entityName>AttributeRelation_entity</entityName>
-        <fieldName>RelationsForSpecificObject</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>ObjectRowId_param</name>
-          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>ObjectType_param</name>
-          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityFieldGroup>
-      <name>NAME_fieldGroup</name>
-      <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/name_fieldgroup/valueProcess.js</valueProcess>
-      <title>Name</title>
-      <description>FIELDGROUP</description>
-      <fields>
-        <element>FIRSTNAME</element>
-        <element>LASTNAME</element>
-      </fields>
-    </entityFieldGroup>
-    <entityField>
-      <name>IMAGE</name>
-      <contentType>IMAGE</contentType>
-      <searchable v="false" />
-      <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/image/valueProcess.js</valueProcess>
-      <onValueChange>%aditoprj%/entity/Employee_entity/entityfields/image/onValueChange.js</onValueChange>
-      <onValueChangeTypes>
-        <element>MASK</element>
-      </onValueChangeTypes>
-    </entityField>
-    <entityField>
-      <name>DEPARTMENT</name>
-      <title>Department</title>
-      <state>INVISIBLE</state>
-    </entityField>
-    <entityField>
-      <name>DESCRIPTION</name>
-      <title>Description</title>
-      <contentType>LONG_TEXT</contentType>
-    </entityField>
-    <entityField>
-      <name>ROLES</name>
-    </entityField>
-    <entityConsumer>
-      <name>EmployeeRoles</name>
-      <title>Roles</title>
-      <fieldType>DEPENDENCY_OUT</fieldType>
-      <dependency>
-        <name>dependency</name>
-        <entityName>EmployeeRole_entity</entityName>
-        <fieldName>EmployeeRoles</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>UserTitle_param</name>
-          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/employeeroles/children/usertitle_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityConsumer>
-      <name>AttributeTree</name>
-      <title>Attribute Tree</title>
-      <fieldType>DEPENDENCY_OUT</fieldType>
-      <dependency>
-        <name>dependency</name>
-        <entityName>AttributeRelationTree_entity</entityName>
-        <fieldName>TreeProvider</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>ObjectRowId_param</name>
-          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>ObjectType_param</name>
-          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributetree/children/objecttype_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityConsumer>
-      <name>Documents</name>
-      <title>Documents</title>
-      <fieldType>DEPENDENCY_OUT</fieldType>
-      <dependency>
-        <name>dependency</name>
-        <entityName>Document_entity</entityName>
-        <fieldName>Documents</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>AssignmentName_param</name>
-          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/documents/children/assignmentname_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>AssignmentTable_param</name>
-          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess>
-        </entityParameter>
-        <entityParameter>
-          <name>AssignmentRowId_param</name>
-          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityConsumer>
-      <name>StoredSelections</name>
-      <title>Stored selections</title>
-      <fieldType>DEPENDENCY_OUT</fieldType>
-      <dependency>
-        <name>dependency</name>
-        <entityName>StoredSelection_entity</entityName>
-        <fieldName>StoredSelections</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>Base64String_param</name>
-          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/storedselections/children/base64string_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityConsumer>
-    <entityField>
-      <name>STORED_SELECTIONS</name>
-      <searchable v="false" />
-    </entityField>
-    <entityProvider>
-      <name>Employees</name>
-      <fieldType>DEPENDENCY_IN</fieldType>
-      <dependencies>
-        <entityDependency>
-          <name>0ca415b9-a940-424e-bee8-05c007b20659</name>
-          <entityName>Activity_entity</entityName>
-          <fieldName>Employees</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-        <entityDependency>
-          <name>73f93f34-bfe9-48fd-b9ce-7f8ba46014c9</name>
-          <entityName>Timetracking_entity</entityName>
-          <fieldName>Employees</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-      </dependencies>
-      <children>
-        <entityParameter>
-          <name>OnlyActives_param</name>
-          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/employees/children/onlyactives_param/valueProcess.js</valueProcess>
-        </entityParameter>
-      </children>
-    </entityProvider>
-  </entityFields>
-  <recordContainers>
-    <jDitoRecordContainer>
-      <name>jdito</name>
-      <jDitoRecordAlias>Data_alias</jDitoRecordAlias>
-      <contentProcess>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/contentProcess.js</contentProcess>
-      <onInsert>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/onInsert.js</onInsert>
-      <onUpdate>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/onUpdate.js</onUpdate>
-      <onDelete>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/onDelete.js</onDelete>
-      <recordFields>
-        <element>UID.value</element>
-        <element>TITLE_ORIGINAL.value</element>
-        <element>ISACTIVE.value</element>
-        <element>FIRSTNAME.value</element>
-        <element>LASTNAME.value</element>
-        <element>EMAIL_ADDRESS.value</element>
-        <element>DESCRIPTION.value</element>
-        <element>CONTACT_ID.value</element>
-        <element>CONTACT_ID.displayValue</element>
-        <element>STORED_SELECTIONS.value</element>
-      </recordFields>
-    </jDitoRecordContainer>
-  </recordContainers>
-</entity>
+<?xml version="1.0" encoding="UTF-8"?>
+<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1">
+  <name>Employee_entity</name>
+  <title>Employee</title>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <onValidation>%aditoprj%/entity/Employee_entity/onValidation.js</onValidation>
+  <afterOperatingState>%aditoprj%/entity/Employee_entity/afterOperatingState.js</afterOperatingState>
+  <iconId>VAADIN:GROUP</iconId>
+  <titleProcess>%aditoprj%/entity/Employee_entity/titleProcess.js</titleProcess>
+  <recordContainer>jdito</recordContainer>
+  <entityFields>
+    <entityProvider>
+      <name>#PROVIDER</name>
+      <lookupIdfield>CONTACT_ID</lookupIdfield>
+    </entityProvider>
+    <entityField>
+      <name>UID</name>
+      <title>Username</title>
+      <mandatory v="true" />
+      <onValidation>%aditoprj%/entity/Employee_entity/entityfields/uid/onValidation.js</onValidation>
+    </entityField>
+    <entityField>
+      <name>TITLE_ORIGINAL</name>
+      <description>the original username, this is required to update the correct user when the username is changed</description>
+      <searchable v="false" />
+    </entityField>
+    <entityField>
+      <name>CONTACT_ID</name>
+      <title>Person</title>
+      <consumer>Contacts</consumer>
+      <linkedContext>Person</linkedContext>
+      <mandatory v="true" />
+      <onValidation>%aditoprj%/entity/Employee_entity/entityfields/contact_id/onValidation.js</onValidation>
+    </entityField>
+    <entityField>
+      <name>FIRSTNAME</name>
+      <title>Firstname</title>
+      <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/firstname/valueProcess.js</valueProcess>
+    </entityField>
+    <entityField>
+      <name>LASTNAME</name>
+      <title>Lastname</title>
+      <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/lastname/valueProcess.js</valueProcess>
+    </entityField>
+    <entityField>
+      <name>ISACTIVE</name>
+      <title>Active</title>
+      <contentType>BOOLEAN</contentType>
+      <possibleItemsProcess>%aditoprj%/entity/Employee_entity/entityfields/isactive/possibleItemsProcess.js</possibleItemsProcess>
+      <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/isactive/valueProcess.js</valueProcess>
+    </entityField>
+    <entityField>
+      <name>EMAIL_ADDRESS</name>
+      <title>Email</title>
+      <mandatory v="true" />
+    </entityField>
+    <entityField>
+      <name>PASSWORD</name>
+      <title>Password</title>
+      <contentType>PASSWORD</contentType>
+      <mandatoryProcess>%aditoprj%/entity/Employee_entity/entityfields/password/mandatoryProcess.js</mandatoryProcess>
+      <searchable v="false" />
+      <stateProcess>%aditoprj%/entity/Employee_entity/entityfields/password/stateProcess.js</stateProcess>
+    </entityField>
+    <entityField>
+      <name>CONFIRM_PASSWORD</name>
+      <title>Confirm password</title>
+      <contentType>PASSWORD</contentType>
+      <mandatoryProcess>%aditoprj%/entity/Employee_entity/entityfields/confirm_password/mandatoryProcess.js</mandatoryProcess>
+      <searchable v="false" />
+      <stateProcess>%aditoprj%/entity/Employee_entity/entityfields/confirm_password/stateProcess.js</stateProcess>
+    </entityField>
+    <entityActionField>
+      <name>setPassword</name>
+      <fieldType>ACTION</fieldType>
+      <title>Set password</title>
+      <onActionProcess>%aditoprj%/entity/Employee_entity/entityfields/setpassword/onActionProcess.js</onActionProcess>
+      <iconId>VAADIN:PASSWORD</iconId>
+    </entityActionField>
+    <entityParameter>
+      <name>PasswordChange_param</name>
+      <expose v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityParameter>
+      <name>OnlyActives_param</name>
+      <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/onlyactives_param/valueProcess.js</valueProcess>
+      <expose v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityConsumer>
+      <name>Contacts</name>
+      <fieldType>DEPENDENCY_OUT</fieldType>
+      <dependency>
+        <name>dependency</name>
+        <entityName>Person_entity</entityName>
+        <fieldName>#PROVIDER</fieldName>
+      </dependency>
+    </entityConsumer>
+    <entityConsumer>
+      <name>Attributes</name>
+      <title>Attributes</title>
+      <fieldType>DEPENDENCY_OUT</fieldType>
+      <dependency>
+        <name>dependency</name>
+        <entityName>AttributeRelation_entity</entityName>
+        <fieldName>RelationsForSpecificObject</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>ObjectRowId_param</name>
+          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js</valueProcess>
+        </entityParameter>
+        <entityParameter>
+          <name>ObjectType_param</name>
+          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityFieldGroup>
+      <name>NAME_fieldGroup</name>
+      <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/name_fieldgroup/valueProcess.js</valueProcess>
+      <title>Name</title>
+      <description>FIELDGROUP</description>
+      <fields>
+        <element>FIRSTNAME</element>
+        <element>LASTNAME</element>
+      </fields>
+    </entityFieldGroup>
+    <entityField>
+      <name>IMAGE</name>
+      <contentType>IMAGE</contentType>
+      <searchable v="false" />
+      <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/image/valueProcess.js</valueProcess>
+      <onValueChange>%aditoprj%/entity/Employee_entity/entityfields/image/onValueChange.js</onValueChange>
+      <onValueChangeTypes>
+        <element>MASK</element>
+      </onValueChangeTypes>
+    </entityField>
+    <entityField>
+      <name>DEPARTMENT</name>
+      <title>Department</title>
+      <state>INVISIBLE</state>
+    </entityField>
+    <entityField>
+      <name>DESCRIPTION</name>
+      <title>Description</title>
+      <contentType>LONG_TEXT</contentType>
+    </entityField>
+    <entityField>
+      <name>ROLES</name>
+    </entityField>
+    <entityConsumer>
+      <name>EmployeeRoles</name>
+      <title>Roles</title>
+      <fieldType>DEPENDENCY_OUT</fieldType>
+      <dependency>
+        <name>dependency</name>
+        <entityName>EmployeeRole_entity</entityName>
+        <fieldName>EmployeeRoles</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>UserTitle_param</name>
+          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/employeeroles/children/usertitle_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityConsumer>
+      <name>AttributeTree</name>
+      <title>Attribute Tree</title>
+      <fieldType>DEPENDENCY_OUT</fieldType>
+      <dependency>
+        <name>dependency</name>
+        <entityName>AttributeRelationTree_entity</entityName>
+        <fieldName>TreeProvider</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>ObjectRowId_param</name>
+          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js</valueProcess>
+        </entityParameter>
+        <entityParameter>
+          <name>ObjectType_param</name>
+          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/attributetree/children/objecttype_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityConsumer>
+      <name>Documents</name>
+      <title>Documents</title>
+      <fieldType>DEPENDENCY_OUT</fieldType>
+      <dependency>
+        <name>dependency</name>
+        <entityName>Document_entity</entityName>
+        <fieldName>Documents</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>AssignmentName_param</name>
+          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/documents/children/assignmentname_param/valueProcess.js</valueProcess>
+        </entityParameter>
+        <entityParameter>
+          <name>AssignmentTable_param</name>
+          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess>
+        </entityParameter>
+        <entityParameter>
+          <name>AssignmentRowId_param</name>
+          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityConsumer>
+      <name>StoredSelections</name>
+      <title>Stored selections</title>
+      <fieldType>DEPENDENCY_OUT</fieldType>
+      <dependency>
+        <name>dependency</name>
+        <entityName>StoredSelection_entity</entityName>
+        <fieldName>StoredSelections</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>Base64String_param</name>
+          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/storedselections/children/base64string_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityField>
+      <name>STORED_SELECTIONS</name>
+      <searchable v="false" />
+    </entityField>
+    <entityProvider>
+      <name>Employees</name>
+      <fieldType>DEPENDENCY_IN</fieldType>
+      <dependencies>
+        <entityDependency>
+          <name>0ca415b9-a940-424e-bee8-05c007b20659</name>
+          <entityName>Activity_entity</entityName>
+          <fieldName>Employees</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+        <entityDependency>
+          <name>73f93f34-bfe9-48fd-b9ce-7f8ba46014c9</name>
+          <entityName>Timetracking_entity</entityName>
+          <fieldName>Employees</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+      </dependencies>
+      <children>
+        <entityParameter>
+          <name>OnlyActives_param</name>
+          <valueProcess>%aditoprj%/entity/Employee_entity/entityfields/employees/children/onlyactives_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityProvider>
+  </entityFields>
+  <recordContainers>
+    <jDitoRecordContainer>
+      <name>jdito</name>
+      <jDitoRecordAlias>Data_alias</jDitoRecordAlias>
+      <contentProcess>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/contentProcess.js</contentProcess>
+      <onInsert>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/onInsert.js</onInsert>
+      <onUpdate>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/onUpdate.js</onUpdate>
+      <onDelete>%aditoprj%/entity/Employee_entity/recordcontainers/jdito/onDelete.js</onDelete>
+      <recordFields>
+        <element>UID.value</element>
+        <element>TITLE_ORIGINAL.value</element>
+        <element>ISACTIVE.value</element>
+        <element>FIRSTNAME.value</element>
+        <element>LASTNAME.value</element>
+        <element>EMAIL_ADDRESS.value</element>
+        <element>DESCRIPTION.value</element>
+        <element>CONTACT_ID.value</element>
+        <element>CONTACT_ID.displayValue</element>
+        <element>STORED_SELECTIONS.value</element>
+      </recordFields>
+    </jDitoRecordContainer>
+  </recordContainers>
+</entity>
diff --git a/entity/Employee_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js b/entity/Employee_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js
index 24b12e282d0e416b544f4b8f318b447a972e1733..ef0d5bcac51027b862291e5abd61c0c05773a8df 100644
--- a/entity/Employee_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js
+++ b/entity/Employee_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js
@@ -1,4 +1,4 @@
-import("system.vars");
-import("system.result");
-
+import("system.vars");
+import("system.result");
+
 result.string(vars.get("$field.CONTACT_ID"));
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/attributes/children/objecttype_param/valueProcess.js b/entity/Employee_entity/entityfields/attributes/children/objecttype_param/valueProcess.js
index 5996e99db232db8df50f155732110608e5abff4e..008915f61deac19ccdd40fff81701de63eb3b6a2 100644
--- a/entity/Employee_entity/entityfields/attributes/children/objecttype_param/valueProcess.js
+++ b/entity/Employee_entity/entityfields/attributes/children/objecttype_param/valueProcess.js
@@ -1,4 +1,4 @@
-import("system.result");
-import("Context_lib");
-
+import("system.result");
+import("Context_lib");
+
 result.string(ContextUtils.getCurrentContextId());
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js b/entity/Employee_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js
index 24b12e282d0e416b544f4b8f318b447a972e1733..ef0d5bcac51027b862291e5abd61c0c05773a8df 100644
--- a/entity/Employee_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js
+++ b/entity/Employee_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js
@@ -1,4 +1,4 @@
-import("system.vars");
-import("system.result");
-
+import("system.vars");
+import("system.result");
+
 result.string(vars.get("$field.CONTACT_ID"));
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/attributetree/children/objecttype_param/valueProcess.js b/entity/Employee_entity/entityfields/attributetree/children/objecttype_param/valueProcess.js
index 5996e99db232db8df50f155732110608e5abff4e..008915f61deac19ccdd40fff81701de63eb3b6a2 100644
--- a/entity/Employee_entity/entityfields/attributetree/children/objecttype_param/valueProcess.js
+++ b/entity/Employee_entity/entityfields/attributetree/children/objecttype_param/valueProcess.js
@@ -1,4 +1,4 @@
-import("system.result");
-import("Context_lib");
-
+import("system.result");
+import("Context_lib");
+
 result.string(ContextUtils.getCurrentContextId());
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/documents/children/assignmentname_param/valueProcess.js b/entity/Employee_entity/entityfields/documents/children/assignmentname_param/valueProcess.js
index f002ad73ad354a03117ff02c9f303e30b7fa453f..3e4bf7585b2ca4628118e46818683fc51bfcf1c5 100644
--- a/entity/Employee_entity/entityfields/documents/children/assignmentname_param/valueProcess.js
+++ b/entity/Employee_entity/entityfields/documents/children/assignmentname_param/valueProcess.js
@@ -1,3 +1,3 @@
-import("system.result");
-
+import("system.result");
+
 result.string("DOCUMENT");
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js b/entity/Employee_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js
index 24b12e282d0e416b544f4b8f318b447a972e1733..ef0d5bcac51027b862291e5abd61c0c05773a8df 100644
--- a/entity/Employee_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js
+++ b/entity/Employee_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js
@@ -1,4 +1,4 @@
-import("system.vars");
-import("system.result");
-
+import("system.vars");
+import("system.result");
+
 result.string(vars.get("$field.CONTACT_ID"));
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js b/entity/Employee_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js
index d8e665c062008cfe155ae02e2fbc6dbd94dd9dd2..183fb187965d2c5c6796149d00f00a617f88aab9 100644
--- a/entity/Employee_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js
+++ b/entity/Employee_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js
@@ -1,3 +1,3 @@
-import("system.result");
-
+import("system.result");
+
 result.string("EMPLOYEE");
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/employeeroles/children/usertitle_param/valueProcess.js b/entity/Employee_entity/entityfields/employeeroles/children/usertitle_param/valueProcess.js
index 2c71e53a498b1ad3d5a0f915aacb4a836b81657f..16c85500b5355a72548030867e3d300661e9d4aa 100644
--- a/entity/Employee_entity/entityfields/employeeroles/children/usertitle_param/valueProcess.js
+++ b/entity/Employee_entity/entityfields/employeeroles/children/usertitle_param/valueProcess.js
@@ -1,4 +1,4 @@
-import("system.vars");
-import("system.result");
-
+import("system.vars");
+import("system.result");
+
 result.string(vars.get("$field.UID"));
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/firstname/valueProcess.js b/entity/Employee_entity/entityfields/firstname/valueProcess.js
index 7558bfe94977c13c45b073b0c9a99adc12c23a77..310fb8ddc85d7f2e3d3d97a8d934ffa9e86f6ba0 100644
--- a/entity/Employee_entity/entityfields/firstname/valueProcess.js
+++ b/entity/Employee_entity/entityfields/firstname/valueProcess.js
@@ -1,16 +1,16 @@
-import("system.result");
-import("system.db");
-import("system.neon");
-import("system.vars");
-import("Sql_lib");
-
-var contactId = vars.get("$field.CONTACT_ID");
-if ((vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT)
-    && contactId)
-{
-    var firstname = db.cell(SqlCondition.begin()
-        .andPrepare("CONTACT.CONTACTID", contactId)
-        .buildSql("select FIRSTNAME from PERSON join CONTACT on CONTACT.PERSON_ID = PERSON.PERSONID")
-    );
-    result.string(firstname);
+import("system.result");
+import("system.db");
+import("system.neon");
+import("system.vars");
+import("Sql_lib");
+
+var contactId = vars.get("$field.CONTACT_ID");
+if ((vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT)
+    && contactId)
+{
+    var firstname = db.cell(SqlCondition.begin()
+        .andPrepare("CONTACT.CONTACTID", contactId)
+        .buildSql("select FIRSTNAME from PERSON join CONTACT on CONTACT.PERSON_ID = PERSON.PERSONID")
+    );
+    result.string(firstname);
 }
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/image/valueProcess.js b/entity/Employee_entity/entityfields/image/valueProcess.js
index 4701975fe7b89eee8bb5b3b9c03696a18d155ba2..d36f4b5cb45ad14fb9cb51f57ec4ba149c526468 100644
--- a/entity/Employee_entity/entityfields/image/valueProcess.js
+++ b/entity/Employee_entity/entityfields/image/valueProcess.js
@@ -1,15 +1,15 @@
-import("system.db");
-import("system.result");
-import("system.neon");
-import("system.vars");
-import("Person_lib");
-import("Sql_lib");
-
-if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW)
-{   
-    var personId = db.cell(SqlCondition.begin()
-        .andPrepareVars("CONTACT.CONTACTID", "$field.CONTACT_ID")
-        .buildSql("select PERSON_ID from CONTACT")
-    );
-    result.string(PersUtils.getImage(personId, (vars.getString("$field.FIRSTNAME") + " " + vars.getString("$field.LASTNAME")).trim()));
-}
+import("system.db");
+import("system.result");
+import("system.neon");
+import("system.vars");
+import("Person_lib");
+import("Sql_lib");
+
+if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW)
+{   
+    var personId = db.cell(SqlCondition.begin()
+        .andPrepareVars("CONTACT.CONTACTID", "$field.CONTACT_ID")
+        .buildSql("select PERSON_ID from CONTACT")
+    );
+    result.string(PersUtils.getImage(personId, (vars.getString("$field.FIRSTNAME") + " " + vars.getString("$field.LASTNAME")).trim()));
+}
diff --git a/entity/Employee_entity/entityfields/isactive/possibleItemsProcess.js b/entity/Employee_entity/entityfields/isactive/possibleItemsProcess.js
index 7ae1ab2b4f2ce2228273b9c5a937ebf89b3631dd..2ce6bd157cf099c253f6dcac83d83af8a1f08720 100644
--- a/entity/Employee_entity/entityfields/isactive/possibleItemsProcess.js
+++ b/entity/Employee_entity/entityfields/isactive/possibleItemsProcess.js
@@ -1,7 +1,7 @@
-import("system.translate");
-import("system.result");
-
-result.object({
-    "true" : translate.text("Yes"),
-    "false" : translate.text("No")
+import("system.translate");
+import("system.result");
+
+result.object({
+    "true" : translate.text("Yes"),
+    "false" : translate.text("No")
 });
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/isactive/valueProcess.js b/entity/Employee_entity/entityfields/isactive/valueProcess.js
index d6c42ccf6d70b17406460ece9041aadeae6fa295..7993af1a5f422c0cbe027b436b00644ceee8d3ed 100644
--- a/entity/Employee_entity/entityfields/isactive/valueProcess.js
+++ b/entity/Employee_entity/entityfields/isactive/valueProcess.js
@@ -1,6 +1,6 @@
-import("system.neon");
-import("system.vars");
-import("system.result");
-
-if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW)
+import("system.neon");
+import("system.vars");
+import("system.result");
+
+if (vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW)
     result.string("true");
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/lastname/valueProcess.js b/entity/Employee_entity/entityfields/lastname/valueProcess.js
index 919ab8037451c587e5471a35d2a215dbed43170f..5913681662c97cf9041552ec407090d186ece436 100644
--- a/entity/Employee_entity/entityfields/lastname/valueProcess.js
+++ b/entity/Employee_entity/entityfields/lastname/valueProcess.js
@@ -1,16 +1,16 @@
-import("system.result");
-import("system.db");
-import("system.neon");
-import("system.vars");
-import("Sql_lib");
-
-var contactId = vars.get("$field.CONTACT_ID");
-if ((vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT)
-    && contactId)
-{
-    var lastname = db.cell(SqlCondition.begin()
-        .andPrepare("CONTACT.CONTACTID", contactId)
-        .buildSql("select LASTNAME from PERSON join CONTACT on CONTACT.PERSON_ID = PERSON.PERSONID")
-    );
-    result.string(lastname);
+import("system.result");
+import("system.db");
+import("system.neon");
+import("system.vars");
+import("Sql_lib");
+
+var contactId = vars.get("$field.CONTACT_ID");
+if ((vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW || vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_EDIT)
+    && contactId)
+{
+    var lastname = db.cell(SqlCondition.begin()
+        .andPrepare("CONTACT.CONTACTID", contactId)
+        .buildSql("select LASTNAME from PERSON join CONTACT on CONTACT.PERSON_ID = PERSON.PERSONID")
+    );
+    result.string(lastname);
 }
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/name_fieldgroup/valueProcess.js b/entity/Employee_entity/entityfields/name_fieldgroup/valueProcess.js
index 2cb5fabc5425ebd133fdb7348d64547af9480c7b..cfe8dbda0147ed4ce85bc5394e118459edb315d1 100644
--- a/entity/Employee_entity/entityfields/name_fieldgroup/valueProcess.js
+++ b/entity/Employee_entity/entityfields/name_fieldgroup/valueProcess.js
@@ -1,4 +1,4 @@
-import("system.vars");
-import("system.result");
-
+import("system.vars");
+import("system.result");
+
 result.string((vars.get("$field.FIRSTNAME") + " " + vars.get("$field.LASTNAME")).trim());
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/setpassword/onActionProcess.js b/entity/Employee_entity/entityfields/setpassword/onActionProcess.js
index bda0a6b48ab0454c9c53a24d7ef9b843d2fc9cb8..47df2ead20cc125d332d120712a5f30184b81b70 100644
--- a/entity/Employee_entity/entityfields/setpassword/onActionProcess.js
+++ b/entity/Employee_entity/entityfields/setpassword/onActionProcess.js
@@ -1,7 +1,7 @@
-import("system.vars");
-import("system.neon");
-
-var params = {
-    "PasswordChange_param" : true
-};
+import("system.vars");
+import("system.neon");
+
+var params = {
+    "PasswordChange_param" : true
+};
 neon.openContext("Employee", "EmployeePassword_view", [vars.get("$field.UID")], neon.OPERATINGSTATE_EDIT, params);
\ No newline at end of file
diff --git a/entity/Employee_entity/entityfields/storedselections/children/base64string_param/valueProcess.js b/entity/Employee_entity/entityfields/storedselections/children/base64string_param/valueProcess.js
index d3297d7eb88ebfc6bd431f13133fca055a238a63..8d34e510f8d26ac8c60f33215e307cdc3067de51 100644
--- a/entity/Employee_entity/entityfields/storedselections/children/base64string_param/valueProcess.js
+++ b/entity/Employee_entity/entityfields/storedselections/children/base64string_param/valueProcess.js
@@ -1,4 +1,4 @@
-import("system.vars");
-import("system.result");
-
+import("system.vars");
+import("system.result");
+
 result.string(vars.get("$field.STORED_SELECTIONS"));
\ No newline at end of file
diff --git a/entity/Employee_entity/onValidation.js b/entity/Employee_entity/onValidation.js
index 1ade64458c9052adb9112d77cc99c22a7a70829e..d10cbbc9b092349c5dccd050e9b687c838570a01 100644
--- a/entity/Employee_entity/onValidation.js
+++ b/entity/Employee_entity/onValidation.js
@@ -1,6 +1,6 @@
-import("system.translate");
-import("system.result");
-import("system.vars");
-
-if (vars.get("$field.PASSWORD") != vars.get("$field.CONFIRM_PASSWORD"))
+import("system.translate");
+import("system.result");
+import("system.vars");
+
+if (vars.get("$field.PASSWORD") != vars.get("$field.CONFIRM_PASSWORD"))
     result.string(translate.text("Password and confirmation must be the same!"));
\ No newline at end of file
diff --git a/entity/Employee_entity/recordcontainers/jdito/contentProcess.js b/entity/Employee_entity/recordcontainers/jdito/contentProcess.js
index de090b22a0c999486c279171bd108c1f8c17d1aa..bd4a9109ac97ec98be86b3e4252d94fbf258a7be 100644
--- a/entity/Employee_entity/recordcontainers/jdito/contentProcess.js
+++ b/entity/Employee_entity/recordcontainers/jdito/contentProcess.js
@@ -1,43 +1,43 @@
-import("system.vars");
-import("system.result");
-import("system.tools");
-import("Util_lib");
-import("Contact_lib");
-import("JditoFilter_lib");
-
-var users;
-if (vars.exists("$local.idvalues") && vars.get("$local.idvalues"))
-    users = [tools.getUser(vars.get("$local.idvalues"), tools.PROFILE_FULL)];
-else
-{
-    var values = ["true", "false"];
-    if (vars.exists("$param.OnlyActives_param") && vars.get("$param.OnlyActives_param") == "true")
-        values = ["true"];
-    users = tools.getUsersByAttribute(tools.ISACTIVE, values, tools.PROFILE_FULL);
-}
-
-users = users.map(function (user)
-{
-    return [
-        user[tools.TITLE],
-        user[tools.TITLE],
-        user[tools.PARAMS][tools.ISACTIVE],
-        user[tools.PARAMS][tools.FIRSTNAME],
-        user[tools.PARAMS][tools.LASTNAME],
-        user[tools.PARAMS][tools.EMAIL],
-        user[tools.DESCRIPTION],
-        user[tools.PARAMS][tools.CONTACTID],
-        ContactUtils.getTitleByContactId(user[tools.PARAMS][tools.CONTACTID]), //TODO: get the names more efficiently
-        user[tools.PARAMS][tools.FRAME_STOREDSEARCHES]
-    ];
-});
-
-var filter = vars.exists("$local.filter") && vars.get("$local.filter"); 
-
-//TODO: this is a workaround that filters the records manually, it should be possible to filter the users with a tools.* method
-users = JditoFilterUtils.filterRecords(["UID", "", "ISACTIVE", "FIRSTNAME", "LASTNAME", "EMAIL_ADDRESS", "DESCRIPTION", "CONTACT_ID", "", ], users, filter);
-
-
-ArrayUtils.sort2d(users, 0, true, false); //sort by username
-
+import("system.vars");
+import("system.result");
+import("system.tools");
+import("Util_lib");
+import("Contact_lib");
+import("JditoFilter_lib");
+
+var users;
+if (vars.exists("$local.idvalues") && vars.get("$local.idvalues"))
+    users = [tools.getUser(vars.get("$local.idvalues"), tools.PROFILE_FULL)];
+else
+{
+    var values = ["true", "false"];
+    if (vars.exists("$param.OnlyActives_param") && vars.get("$param.OnlyActives_param") == "true")
+        values = ["true"];
+    users = tools.getUsersByAttribute(tools.ISACTIVE, values, tools.PROFILE_FULL);
+}
+
+users = users.map(function (user)
+{
+    return [
+        user[tools.TITLE],
+        user[tools.TITLE],
+        user[tools.PARAMS][tools.ISACTIVE],
+        user[tools.PARAMS][tools.FIRSTNAME],
+        user[tools.PARAMS][tools.LASTNAME],
+        user[tools.PARAMS][tools.EMAIL],
+        user[tools.DESCRIPTION],
+        user[tools.PARAMS][tools.CONTACTID],
+        ContactUtils.getTitleByContactId(user[tools.PARAMS][tools.CONTACTID]), //TODO: get the names more efficiently
+        user[tools.PARAMS][tools.FRAME_STOREDSEARCHES]
+    ];
+});
+
+var filter = vars.exists("$local.filter") && vars.get("$local.filter"); 
+
+//TODO: this is a workaround that filters the records manually, it should be possible to filter the users with a tools.* method
+users = JditoFilterUtils.filterRecords(["UID", "", "ISACTIVE", "FIRSTNAME", "LASTNAME", "EMAIL_ADDRESS", "DESCRIPTION", "CONTACT_ID", "", ], users, filter);
+
+
+ArrayUtils.sort2d(users, 0, true, false); //sort by username
+
 result.object(users);
\ No newline at end of file
diff --git a/entity/Employee_entity/recordcontainers/jdito/onDelete.js b/entity/Employee_entity/recordcontainers/jdito/onDelete.js
index b3064b9528d3c514953b7e2441c5d71490bcb865..084591314517206b0f791a54ad7a39699e6622fe 100644
--- a/entity/Employee_entity/recordcontainers/jdito/onDelete.js
+++ b/entity/Employee_entity/recordcontainers/jdito/onDelete.js
@@ -1,8 +1,8 @@
-import("system.neon");
-import("system.vars");
-import("system.tools");
-import("Employee_lib");
-
-//TODO: the current user should not delete himself, put this condition in grantDelete when available
-if (EmployeeUtils.getCurrentUserName() != vars.get("$field.UID"))
+import("system.neon");
+import("system.vars");
+import("system.tools");
+import("Employee_lib");
+
+//TODO: the current user should not delete himself, put this condition in grantDelete when available
+if (EmployeeUtils.getCurrentUserName() != vars.get("$field.UID"))
     tools.deleteUser(vars.get("$field.UID"));
\ No newline at end of file
diff --git a/entity/Employee_entity/recordcontainers/jdito/onInsert.js b/entity/Employee_entity/recordcontainers/jdito/onInsert.js
index 3693a103f69a82d454fdbad9cf027ef76635ecc4..21f772e8ce2d94252d75f4381f4b7de8b48c0c67 100644
--- a/entity/Employee_entity/recordcontainers/jdito/onInsert.js
+++ b/entity/Employee_entity/recordcontainers/jdito/onInsert.js
@@ -1,22 +1,22 @@
-import("system.neon");
-import("system.vars");
-import("system.tools");
-
-var user = {};
-var params = []; //this has to be an array
-params[tools.FIRSTNAME] = vars.get("$field.FIRSTNAME");
-params[tools.LASTNAME] = vars.get("$field.LASTNAME");
-params[tools.EMAIL] = vars.get("$field.EMAIL_ADDRESS");
-params[tools.CALENDARID] = vars.get("$field.EMAIL_ADDRESS");
-params[tools.CONTACTID] = vars.get("$field.CONTACT_ID");
-params[tools.DESCRIPTION] = vars.get("$field.DESCRIPTION");
-params[tools.ISACTIVE] = vars.get("$field.ISACTIVE");
-
-user[tools.TITLE] = vars.get("$field.UID");
-user[tools.PARAMS] = params;
-
-if (vars.get("$field.PASSWORD") && vars.get("$field.PASSWORD") == vars.get("$field.CONFIRM_PASSWORD"))
-{
-    user[tools.PASSWORD] = vars.getString("$field.PASSWORD");
-}
+import("system.neon");
+import("system.vars");
+import("system.tools");
+
+var user = {};
+var params = []; //this has to be an array
+params[tools.FIRSTNAME] = vars.get("$field.FIRSTNAME");
+params[tools.LASTNAME] = vars.get("$field.LASTNAME");
+params[tools.EMAIL] = vars.get("$field.EMAIL_ADDRESS");
+params[tools.CALENDARID] = vars.get("$field.EMAIL_ADDRESS");
+params[tools.CONTACTID] = vars.get("$field.CONTACT_ID");
+params[tools.DESCRIPTION] = vars.get("$field.DESCRIPTION");
+params[tools.ISACTIVE] = vars.get("$field.ISACTIVE");
+
+user[tools.TITLE] = vars.get("$field.UID");
+user[tools.PARAMS] = params;
+
+if (vars.get("$field.PASSWORD") && vars.get("$field.PASSWORD") == vars.get("$field.CONFIRM_PASSWORD"))
+{
+    user[tools.PASSWORD] = vars.getString("$field.PASSWORD");
+}
 tools.insertUser(user);
\ No newline at end of file
diff --git a/entity/Employee_entity/recordcontainers/jdito/onUpdate.js b/entity/Employee_entity/recordcontainers/jdito/onUpdate.js
index 5cc71867cd697b16bbfc17ef56a0678b144e2545..03a003f2633627942005c8c90878f827e3e54ccd 100644
--- a/entity/Employee_entity/recordcontainers/jdito/onUpdate.js
+++ b/entity/Employee_entity/recordcontainers/jdito/onUpdate.js
@@ -1,39 +1,39 @@
-import("system.db");
-import("system.logging");
-import("system.vars");
-import("system.tools");
-import("Person_lib");
-import("Entity_lib");
-
-// TODO: this is a workaround for missing possibility to react on changes of fields not connected to record Contqainer #1030023
-FieldChanges.assimilateChangeAndDispose("$field.IMAGE", function (state, value)
-{
-    var personId = db.cell(SqlCondition.begin()
-        .andPrepareVars("CONTACT.CONTACTID", "$field.CONTACT_ID")
-        .buildSql("select PERSON_ID from CONTACT")
-    );
-    if (state == FieldChanges.STATE_CHANGED())
-        PersUtils.setImage(personId, value);
-    else
-        PersUtils.removeImage(personId);
-});
-
-var user = {};
-user[tools.PARAMS] = [];
-
-user[tools.TITLE] = vars.get("$field.UID");
-user[tools.PARAMS][tools.ISACTIVE] = vars.get("$field.ISACTIVE");
-user[tools.PARAMS][tools.FIRSTNAME] = vars.get("$field.FIRSTNAME");
-user[tools.PARAMS][tools.LASTNAME] = vars.get("$field.LASTNAME");
-user[tools.PARAMS][tools.EMAIL] = vars.get("$field.EMAIL_ADDRESS");
-user[tools.PARAMS][tools.CALENDARID] = vars.get("$field.EMAIL_ADDRESS");
-user[tools.PARAMS][tools.CONTACTID] = vars.get("$field.CONTACT_ID");
-user[tools.PARAMS][tools.DESCRIPTION] = vars.get("$field.DESCRIPTION");
-
-if (vars.exists("$param.PasswordChange_param") && vars.get("$param.PasswordChange_param") 
-    && vars.get("$field.PASSWORD") == vars.get("$field.CONFIRM_PASSWORD"))
-{
-    user[tools.PASSWORD] = vars.getString("$field.PASSWORD");
-}
-
+import("system.db");
+import("system.logging");
+import("system.vars");
+import("system.tools");
+import("Person_lib");
+import("Entity_lib");
+
+// TODO: this is a workaround for missing possibility to react on changes of fields not connected to record Contqainer #1030023
+FieldChanges.assimilateChangeAndDispose("$field.IMAGE", function (state, value)
+{
+    var personId = db.cell(SqlCondition.begin()
+        .andPrepareVars("CONTACT.CONTACTID", "$field.CONTACT_ID")
+        .buildSql("select PERSON_ID from CONTACT")
+    );
+    if (state == FieldChanges.STATE_CHANGED())
+        PersUtils.setImage(personId, value);
+    else
+        PersUtils.removeImage(personId);
+});
+
+var user = {};
+user[tools.PARAMS] = [];
+
+user[tools.TITLE] = vars.get("$field.UID");
+user[tools.PARAMS][tools.ISACTIVE] = vars.get("$field.ISACTIVE");
+user[tools.PARAMS][tools.FIRSTNAME] = vars.get("$field.FIRSTNAME");
+user[tools.PARAMS][tools.LASTNAME] = vars.get("$field.LASTNAME");
+user[tools.PARAMS][tools.EMAIL] = vars.get("$field.EMAIL_ADDRESS");
+user[tools.PARAMS][tools.CALENDARID] = vars.get("$field.EMAIL_ADDRESS");
+user[tools.PARAMS][tools.CONTACTID] = vars.get("$field.CONTACT_ID");
+user[tools.PARAMS][tools.DESCRIPTION] = vars.get("$field.DESCRIPTION");
+
+if (vars.exists("$param.PasswordChange_param") && vars.get("$param.PasswordChange_param") 
+    && vars.get("$field.PASSWORD") == vars.get("$field.CONFIRM_PASSWORD"))
+{
+    user[tools.PASSWORD] = vars.getString("$field.PASSWORD");
+}
+
 tools.updateUser(user);
\ No newline at end of file
diff --git a/entity/Employee_entity/titleProcess.js b/entity/Employee_entity/titleProcess.js
index 2cb5fabc5425ebd133fdb7348d64547af9480c7b..cfe8dbda0147ed4ce85bc5394e118459edb315d1 100644
--- a/entity/Employee_entity/titleProcess.js
+++ b/entity/Employee_entity/titleProcess.js
@@ -1,4 +1,4 @@
-import("system.vars");
-import("system.result");
-
+import("system.vars");
+import("system.result");
+
 result.string((vars.get("$field.FIRSTNAME") + " " + vars.get("$field.LASTNAME")).trim());
\ No newline at end of file
diff --git a/entity/ObjectRelationType_entity/ObjectRelationType_entity.aod b/entity/ObjectRelationType_entity/ObjectRelationType_entity.aod
index 27f8339b5b0d693590b977d85d3aa51ecb69185f..7569f2f522cda9dfe237cdd8af2d3594c8a505ea 100644
--- a/entity/ObjectRelationType_entity/ObjectRelationType_entity.aod
+++ b/entity/ObjectRelationType_entity/ObjectRelationType_entity.aod
@@ -32,9 +32,18 @@
     <entityProvider>
       <name>ObjectRelationTypes</name>
       <fieldType>DEPENDENCY_IN</fieldType>
+      <dependencies>
+        <entityDependency>
+          <name>81f4567a-fc89-49fc-be86-77600cb66305</name>
+          <entityName>ObjectTree_entity</entityName>
+          <fieldName>ObjectRelationTypes</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+      </dependencies>
       <children>
         <entityParameter>
           <name>SourceObjectType_param</name>
+          <expose v="true" />
           <triggerRecalculation v="true" />
         </entityParameter>
       </children>
diff --git a/entity/ObjectRelationType_entity/recordcontainers/jdito/contentProcess.js b/entity/ObjectRelationType_entity/recordcontainers/jdito/contentProcess.js
index 853e49e1a53cc5de0f317ea827cf4a56bc5c6adc..23e43cb44c7bc9f62000e8d7c77f7f8b24cc0a22 100644
--- a/entity/ObjectRelationType_entity/recordcontainers/jdito/contentProcess.js
+++ b/entity/ObjectRelationType_entity/recordcontainers/jdito/contentProcess.js
@@ -1,14 +1,6 @@
-import("system.translate");
-import("system.db");
+import("system.logging");
 import("system.result");
 import("system.vars");
+import("ObjectRelation_lib");
 
-result.object(db.table(
-["select main.AB_OBJECTRELATIONTYPEID, main.RELATION_TITLE \n\
-    from AB_OBJECTRELATIONTYPE main \n\
-    left join AB_OBJECTRELATIONTYPE type2 on (type2.AB_OBJECTRELATIONTYPEID <> main.AB_OBJECTRELATIONTYPEID and type2.RELATION_TYPE = main.RELATION_TYPE) \n\
-    where case when type2.OBJECT_TYPE is null then ( ? = main.OBJECT_TYPE) else ( ? = type2.OBJECT_TYPE) end"
-, [
-  [vars.get("$param.SourceObjectType_param"), db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]],
-  [vars.get("$param.SourceObjectType_param"), db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]],
-]]));
\ No newline at end of file
+result.object(ObjectRelationUtils.getPossibleRelationTypes(vars.get("$param.SourceObjectType_param")));
\ No newline at end of file
diff --git a/entity/ObjectTree_entity/ObjectTree_entity.aod b/entity/ObjectTree_entity/ObjectTree_entity.aod
index 76ab8c7b04769223fd90e79169ebe97af852c7ea..a6986857385974ed4be09d1609394f2c4035aa28 100644
--- a/entity/ObjectTree_entity/ObjectTree_entity.aod
+++ b/entity/ObjectTree_entity/ObjectTree_entity.aod
@@ -11,6 +11,8 @@
     <entityProvider>
       <name>TreeProvider</name>
       <fieldType>DEPENDENCY_IN</fieldType>
+      <targetContextField>TARGET_CONTEXT</targetContextField>
+      <targetIdField>TARGET_ID</targetIdField>
       <dependencies>
         <entityDependency>
           <name>f4c0605f-3ccb-4ff1-b460-7268e8553857</name>
@@ -25,6 +27,18 @@
           <isConsumer v="false" />
         </entityDependency>
       </dependencies>
+      <children>
+        <entityParameter>
+          <name>ObjectId_param</name>
+          <expose v="true" />
+          <mandatory v="true" />
+        </entityParameter>
+        <entityParameter>
+          <name>ObjectType_param</name>
+          <expose v="true" />
+          <mandatory v="true" />
+        </entityParameter>
+      </children>
     </entityProvider>
     <entityParameter>
       <name>ObjectId_param</name>
@@ -49,6 +63,46 @@
       <name>DESCRIPTION</name>
       <valueProcess>%aditoprj%/entity/ObjectTree_entity/entityfields/description/valueProcess.js</valueProcess>
     </entityField>
+    <entityField>
+      <name>Selector</name>
+      <title>Relationtype</title>
+      <consumer>ObjectRelationTypes</consumer>
+      <state>EDITABLE</state>
+      <onValueChange>%aditoprj%/entity/ObjectTree_entity/entityfields/selector/onValueChange.js</onValueChange>
+    </entityField>
+    <entityConsumer>
+      <name>ObjectRelationTypes</name>
+      <fieldType>DEPENDENCY_OUT</fieldType>
+      <dependency>
+        <name>dependency</name>
+        <entityName>ObjectRelationType_entity</entityName>
+        <fieldName>ObjectRelationTypes</fieldName>
+      </dependency>
+      <children>
+        <entityParameter>
+          <name>SourceObjectType_param</name>
+          <valueProcess>%aditoprj%/entity/ObjectTree_entity/entityfields/objectrelationtypes/children/sourceobjecttype_param/valueProcess.js</valueProcess>
+        </entityParameter>
+      </children>
+    </entityConsumer>
+    <entityParameter>
+      <name>ObjectType_param</name>
+      <expose v="true" />
+      <mandatory v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityField>
+      <name>EXPANDED</name>
+    </entityField>
+    <entityField>
+      <name>NODEID</name>
+    </entityField>
+    <entityField>
+      <name>TARGET_ID</name>
+    </entityField>
+    <entityField>
+      <name>TARGET_CONTEXT</name>
+    </entityField>
   </entityFields>
   <recordContainers>
     <jDitoRecordContainer>
@@ -57,8 +111,11 @@
       <contentProcess>%aditoprj%/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js</contentProcess>
       <recordFields>
         <element>UID.value</element>
-        <element>PARENT_ID.value</element>
         <element>TITLE.value</element>
+        <element>PARENT_ID.value</element>
+        <element>EXPANDED.value</element>
+        <element>TARGET_ID.value</element>
+        <element>TARGET_CONTEXT.value</element>
       </recordFields>
     </jDitoRecordContainer>
   </recordContainers>
diff --git a/entity/ObjectTree_entity/entityfields/objectrelationtypes/children/sourceobjecttype_param/valueProcess.js b/entity/ObjectTree_entity/entityfields/objectrelationtypes/children/sourceobjecttype_param/valueProcess.js
new file mode 100644
index 0000000000000000000000000000000000000000..95c8514f3bbc2804547c47b50ec222c09aec3f59
--- /dev/null
+++ b/entity/ObjectTree_entity/entityfields/objectrelationtypes/children/sourceobjecttype_param/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.vars");
+import("system.result");
+
+result.string(vars.get("$param.ObjectType_param"));
\ No newline at end of file
diff --git a/entity/ObjectTree_entity/entityfields/selector/onValueChange.js b/entity/ObjectTree_entity/entityfields/selector/onValueChange.js
new file mode 100644
index 0000000000000000000000000000000000000000..821651c14e644cd4dd9345fca851737a023bcf09
--- /dev/null
+++ b/entity/ObjectTree_entity/entityfields/selector/onValueChange.js
@@ -0,0 +1,3 @@
+import("system.neon");
+
+neon.refresh()
\ No newline at end of file
diff --git a/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js b/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js
index 34ef78477331f19dc8f0ebb899c3b97bfb14454d..267103d35e50fbc117b4fba9333e1e9163c2b443 100644
--- a/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js
+++ b/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js
@@ -1,107 +1,178 @@
+import("system.translate");
+import("system.util");
 import("system.db");
-import("system.vars");
+import("system.text");
 import("system.result");
-import("system.translate");
+import("system.vars");
+import("system.logging");
+import("ObjectRelation_lib");
 import("Context_lib");
-import("Sql_lib")
-
-var thisObjectId = vars.get("$param.ObjectId_param");
-
-var objectRelations = fetchObjectRelations(thisObjectId);
-var mappedObjectRelations = mapObjectRelations(objectRelations);
+import("Sql_lib");
 
-var treeData = buildTreeData(mappedObjectRelations);
+var relationTypesCache = {};
+var tree = []
 
+_loadObjectRelationTree(vars.get("$param.ObjectId_param"), vars.get("$param.ObjectType_param"), vars.get("$field.Selector"));
 
-result.object(treeData);
+result.object(tree);
 
-/**
- * Will fetch all objects relations which are in relation with the given
- * object ID. It will compare the given object ID with `OBJECT1_ROWID` and
- * `OBJECT2_ROWID`.
- * 
- * It will always return the following array signature:
- * (0) OBJECT1_ROWID | (1) OBJECT2_ROWID | (2) AB_OBJECTRELATIONTYPE1 |(3) type1.OBJECT_TYPE | (4) type1.RELATION_TITLE
- * (5) AB_OBJECTRELATIONTYPE2  | (6) type2.OBJECT_TYPE | (7) type2.RELATION_TITLE | (8) Name of object 1 | (9) Name of object 2
- *
- * @return Will return the given schema above. You can assume, that there will always
- * be an array. 
- */
-function fetchObjectRelations (pObjectID) {
-    var databaseResult = db.table(
-          "SELECT OBJECT1_ROWID, OBJECT2_ROWID, AB_OBJECTRELATIONTYPE1, type1.OBJECT_TYPE, type1.RELATION_TITLE, AB_OBJECTRELATIONTYPE2, type2.OBJECT_TYPE, type2.RELATION_TITLE, "
-        + ContextUtils.getNameSubselectSql("type1.OBJECT_TYPE", "OBJECT1_ROWID") + ", " + ContextUtils.getNameSubselectSql("type2.OBJECT_TYPE", "OBJECT2_ROWID") + " "
-        + "FROM ADITO.AB_OBJECTRELATION as relation "
-        + "left join AB_OBJECTRELATIONTYPE as type1 on AB_OBJECTRELATIONTYPE1 = type1.AB_OBJECTRELATIONTYPEID "
-        + "left join AB_OBJECTRELATIONTYPE as type2 on AB_OBJECTRELATIONTYPE2 = type2.AB_OBJECTRELATIONTYPEID "
-        + "where OBJECT1_ROWID = '" + thisObjectId + "' or OBJECT2_ROWID = '" + thisObjectId + "'");
+function _loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationType, pNodeId, pLayer)
+{
+    if (pLayer == undefined)
+        pLayer = 0;
     
-    return databaseResult;
+    if (pNodeId == undefined)
+        pNodeId = null;
+        
+    var currentObjectId = pObjectId
+        
+    if (currentObjectId && pObjectType)
+    {
+        if (pLayer == 0)
+        {
+            if (pObjectRelationType)
+            {
+                // if hirachy: get most top id else use the current currentObjectId
+                if (_getHierarchy(pObjectRelationType))
+                {
+                    currentObjectId = _getRootID(currentObjectId, pObjectType);
+                    // ??? set type also ???
+                }
+            }
+            else // no ObjectType chosen
+            {
+                // load all ObjectRelationTypes
+                var relationTypes = _getRelationTypes(pObjectType);
+                
+                for (let i=0; i<relationTypes.length; i++)
+                {   
+                    var data = _getEntryData(currentObjectId, relationTypes[i][0], relationTypes[i][3], relationTypes[i][7], relationTypes[i][8]);
+                    
+                    // if any subentry: show objectType
+                    if (data.length > 0)
+                    {
+                        // TODO: Icons, BINDATA
+                        // var icon = getIcon...
+                        var uid = [currentObjectId, i, relationTypes[i]];
+                        tree.push([JSON.stringify(uid), translate.text(relationTypes[i][1]), JSON.stringify(pNodeId), true, null, null]);
+                        
+                        _loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationType, uid, pLayer+1);
+                    }
+                }
+            }
+        }
+        else if (pLayer >= 1)
+        {
+            var typeData = pNodeId[2];
+            var typeId = typeData[0];
+            var hierarchy = typeData[4];
+            var destObjectType = typeData[6];
+            var relationType1 = typeData[7];
+            var relationType2 = typeData[8];
+            var direction = typeData[3];
+            
+            if (hierarchy == "1" && !pObjectRelationType)
+            {
+                var myData = _getEntryData(pNodeId[0], typeId, direction, relationType1, relationType2)
+                
+                // wenn typ-side 1 dann die eine Richtung, sonnst die andere?
+                let uids = _insertEntry(tree, myData, pNodeId, pLayer, destObjectType, typeData)
+                for (let i = 0; i < uids.length; i++) 
+                {                    
+                    _loadObjectRelationTree(uids[i][0], uids[i][3], pObjectRelationType, uids[i], pLayer+1);
+                }
+            }
+            else
+            {
+                // get ObjectRelationType from nodeId
+                if (!pObjectRelationType)
+                {  
+                    _insertEntry(tree, _getEntryData(pNodeId[0], typeId, direction, relationType1, relationType2), pNodeId, pLayer, destObjectType, typeData)
+                }
+                // TODO: wenn relationtype selected
+            }
+        }
+    }
 }
 
 /**
- * Will map the given object relations into a valid schema for the tree.
- * The requried schema for the param can be found in function
- * {@link fetchObjectRelations}.
- * This function is required for additional filtering an mapping of the data.
- *
- * It will always return the following array signature:
- * (0) Object type ID | (1) Object type name | (2) Relation 
- * 
- *
- * @param pObjectRelations Array with object relations in specific schema.
- * @return Will return the given schema above. You can assume, that there will
- * always be an array.
-* 
-* @return The mapped Array with object relations in the following format:
-* ObjectTypeID | ObjectType | RelationTitle | ObjectID 
+ * load data for a relation.
+ * OBJECT_ROWID, AB_OBJECTRELATIONID, AB_OBJECTRELATIONTYPEID, RELATION_TITLE
  */
-function mapObjectRelations (pObjectRelations) {
-    var resultSet = [];
+function _getEntryData(pObjectId, pRelationTypeId, pDirection, pRelationType1, pRelationType2, pRecursion)
+{
+    if (pRelationType1 == undefined || pRelationType2 == undefined) 
+        return [];
     
-    for (var i = 0; i < pObjectRelations.length; i++) {
-        var currentRecord = pObjectRelations[i];
+    var myNum;
+    var otherNum;
+        
+    if (pDirection == "normal") 
+    {
+        otherNum = 1;
+        myNum = 2;
+    }
+    else
+    {
+        otherNum = 2;
+        myNum = 1;
+    }
         
-        var objectRowId1 = currentRecord[0];
-        var objectRowId2 = currentRecord[1];
+    // exclude previous node
+    var condition = " and AB_OBJECTRELATIONTYPE1 = '" + pRelationType1 + "' and AB_OBJECTRELATIONTYPE2 = '" + pRelationType2 + "' and OBJECT" + otherNum + "_ROWID";
+    if (!pRelationTypeId)
+        condition += " is not null ";
+    else 
+        condition += " <> '" + pObjectId + "' "; 
         
-        if (objectRowId1 === thisObjectId) {
-            resultSet.push([currentRecord[5], currentRecord[6], currentRecord[7], currentRecord[1], currentRecord[9]]);
-        } else if (objectRowId2 === thisObjectId) {
-            resultSet.push([currentRecord[2], currentRecord[3], currentRecord[4], currentRecord[0], currentRecord[8]]);
-        }
+    // TODO: BINDATA?
+    // var image = getImageObject("Beziehung");
+
+    // TODO: RELDESC gibts noch nicht
+    var data = db.table("select OBJECT" + otherNum + "_ROWID, AB_OBJECTRELATIONID, OBJECT_TYPE, RELATION_TITLE"
+        + " from AB_OBJECTRELATION \n\
+            join AB_OBJECTRELATIONTYPE on AB_OBJECTRELATIONTYPEID = AB_OBJECTRELATIONTYPE" + myNum + " \n\
+            and OBJECT" + myNum + "_ROWID = '" + pObjectId + "' " + condition
+        );
+            
+    if (data.length == 0 && pDirection == "same" && !pRecursion)
+    {
+         return _getEntryData (pObjectId, pRelationTypeId, "normal", pRelationType1, pRelationType2, true)
     }
     
-    return resultSet
+    // TODO: BINDATA?
+    //for ( var i = 0; i < data.length; i++)  data[i][2] = image[data[i][2]] == undefined ? "" : image[data[i][2]];
+    return data;
+}
+
+function _getRelationTypes(pObjectType)
+{
+    // TODO: load from entity when possible
+    if (relationTypesCache[pObjectType] == undefined)
+        relationTypesCache[pObjectType] = ObjectRelationUtils.getPossibleRelationTypes(pObjectType, true);
+    
+    return relationTypesCache[pObjectType];
+}
+
+function _insertEntry (pTree, pEntryData, pNodeId, pLayer, pObjectType, pRelationTypeData)
+{
+    var expanded = true;
+    if (pLayer > 10) expanded = false;
+    // TODO: display address (tooltip wird denke ich nicht benötigt, da preview vorhanden)
+    var uids = [];
+    for(let i = 0; i < pEntryData.length; i++)
+    {
+        var display = db.cell(ContextUtils.getNameSql(pObjectType, pEntryData[i][0]));
+        // TODO: Icon
+        var uid = [pEntryData[i][0], i, pRelationTypeData, pObjectType, pNodeId, pEntryData[i][2]]
+        uids.push(uid);
+        pTree.push([JSON.stringify(uid), display, JSON.stringify(pNodeId), expanded, pEntryData[i][0], pObjectType]);
+    }
+    return uids;
 }
 
-function buildTreeData (pObjectRelations) {
-   // Group each relation type
-   var relationTypeMapping = {}
-   
-   var i = 0;
-   for (i = 0; i < pObjectRelations.length; i++) {
-       let currentRelation = pObjectRelations[i];
-       
-       if (relationTypeMapping[currentRelation[0]] === undefined)
-           relationTypeMapping[currentRelation[0]] = currentRelation[2];
-   }
-   
-   var treeRows = []
-   for (i = 0; i < pObjectRelations.length; i++) {
-       let currentRelation = pObjectRelations[i];
-              
-       treeRows.push([currentRelation[3], currentRelation[0], currentRelation[4]]);
-   }
-   
-   // Root elements
-   for (i = 0 ; i < Object.keys(relationTypeMapping).length; i++) {
-       var currentKey = Object.keys(relationTypeMapping)[i];
-       
-       var translatedTitle = translate.text(relationTypeMapping[currentKey])
-       
-       treeRows.push([currentKey, null, translatedTitle]);
-   }
-   
-   return treeRows;
+function _getHierarchy(pObjectRelationType)
+{
+    return db.cell(SqlCondition.begin().andPrepare("AB_OBJECTRELATIONTYPE.AB_OBJECTRELATIONTYPEID", pObjectRelationType)
+                                       .buildSql("select HIERARCHY from AB_OBJECTRELATIONTYPE", "1=2")) == "1";
 }
\ No newline at end of file
diff --git a/entity/Organisation_entity/Organisation_entity.aod b/entity/Organisation_entity/Organisation_entity.aod
index 8130dfa7663f2e38d8607af39d38f272f39b3195..783f0caa297e5871c7b06243bdc90fe3defe3193 100644
--- a/entity/Organisation_entity/Organisation_entity.aod
+++ b/entity/Organisation_entity/Organisation_entity.aod
@@ -609,6 +609,10 @@
           <name>ObjectId_param</name>
           <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/objecttrees/children/objectid_param/valueProcess.js</valueProcess>
         </entityParameter>
+        <entityParameter>
+          <name>ObjectType_param</name>
+          <valueProcess>%aditoprj%/entity/Organisation_entity/entityfields/objecttrees/children/objecttype_param/valueProcess.js</valueProcess>
+        </entityParameter>
       </children>
     </entityConsumer>
     <entityActionField>
diff --git a/entity/Organisation_entity/entityfields/objecttrees/children/objecttype_param/valueProcess.js b/entity/Organisation_entity/entityfields/objecttrees/children/objecttype_param/valueProcess.js
new file mode 100644
index 0000000000000000000000000000000000000000..008915f61deac19ccdd40fff81701de63eb3b6a2
--- /dev/null
+++ b/entity/Organisation_entity/entityfields/objecttrees/children/objecttype_param/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.result");
+import("Context_lib");
+
+result.string(ContextUtils.getCurrentContextId());
\ No newline at end of file
diff --git a/entity/Person_entity/Person_entity.aod b/entity/Person_entity/Person_entity.aod
index 9317d1cf6fbb5404933304e172d072980e52eaae..44bc063e4a6002562ea964b9dd9003dcd17d7ac2 100644
--- a/entity/Person_entity/Person_entity.aod
+++ b/entity/Person_entity/Person_entity.aod
@@ -657,6 +657,10 @@ Usually this is used for filtering COMMUNICATION-entries by a specified contact
           <name>ObjectId_param</name>
           <valueProcess>%aditoprj%/entity/Person_entity/entityfields/objecttrees/children/objectid_param/valueProcess.js</valueProcess>
         </entityParameter>
+        <entityParameter>
+          <name>ObjectType_param</name>
+          <valueProcess>%aditoprj%/entity/Person_entity/entityfields/objecttrees/children/objecttype_param/valueProcess.js</valueProcess>
+        </entityParameter>
       </children>
     </entityConsumer>
     <entityField>
diff --git a/entity/Person_entity/entityfields/objecttrees/children/objecttype_param/valueProcess.js b/entity/Person_entity/entityfields/objecttrees/children/objecttype_param/valueProcess.js
new file mode 100644
index 0000000000000000000000000000000000000000..008915f61deac19ccdd40fff81701de63eb3b6a2
--- /dev/null
+++ b/entity/Person_entity/entityfields/objecttrees/children/objecttype_param/valueProcess.js
@@ -0,0 +1,4 @@
+import("system.result");
+import("Context_lib");
+
+result.string(ContextUtils.getCurrentContextId());
\ No newline at end of file
diff --git a/entity/StoredSelection_entity/StoredSelection_entity.aod b/entity/StoredSelection_entity/StoredSelection_entity.aod
index e782b82bd5c719c813d7b446f8cedba3043a19b3..66698e0d5000c21d5ce5ef440b2ca1f54fbd0232 100644
--- a/entity/StoredSelection_entity/StoredSelection_entity.aod
+++ b/entity/StoredSelection_entity/StoredSelection_entity.aod
@@ -1,53 +1,53 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1">
-  <name>StoredSelection_entity</name>
-  <title>Stored selections</title>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <recordContainer>jdito</recordContainer>
-  <entityFields>
-    <entityProvider>
-      <name>#PROVIDER</name>
-    </entityProvider>
-    <entityField>
-      <name>UID</name>
-    </entityField>
-    <entityParameter>
-      <name>Base64String_param</name>
-      <expose v="true" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityProvider>
-      <name>StoredSelections</name>
-      <fieldType>DEPENDENCY_IN</fieldType>
-      <dependencies>
-        <entityDependency>
-          <name>1386345f-0ed8-4c82-b96d-a249775314ee</name>
-          <entityName>Employee_entity</entityName>
-          <fieldName>StoredSelections</fieldName>
-          <isConsumer v="false" />
-        </entityDependency>
-      </dependencies>
-    </entityProvider>
-    <entityField>
-      <name>CONTEXT_NAME</name>
-      <title>Module</title>
-      <state>READONLY</state>
-    </entityField>
-    <entityField>
-      <name>SELECTION_TITLE</name>
-      <title>Name</title>
-      <state>READONLY</state>
-    </entityField>
-  </entityFields>
-  <recordContainers>
-    <jDitoRecordContainer>
-      <name>jdito</name>
-      <contentProcess>%aditoprj%/entity/StoredSelection_entity/recordcontainers/jdito/contentProcess.js</contentProcess>
-      <recordFields>
-        <element>UID.value</element>
-        <element>CONTEXT_NAME.value</element>
-        <element>SELECTION_TITLE.value</element>
-      </recordFields>
-    </jDitoRecordContainer>
-  </recordContainers>
-</entity>
+<?xml version="1.0" encoding="UTF-8"?>
+<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1">
+  <name>StoredSelection_entity</name>
+  <title>Stored selections</title>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <recordContainer>jdito</recordContainer>
+  <entityFields>
+    <entityProvider>
+      <name>#PROVIDER</name>
+    </entityProvider>
+    <entityField>
+      <name>UID</name>
+    </entityField>
+    <entityParameter>
+      <name>Base64String_param</name>
+      <expose v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityProvider>
+      <name>StoredSelections</name>
+      <fieldType>DEPENDENCY_IN</fieldType>
+      <dependencies>
+        <entityDependency>
+          <name>1386345f-0ed8-4c82-b96d-a249775314ee</name>
+          <entityName>Employee_entity</entityName>
+          <fieldName>StoredSelections</fieldName>
+          <isConsumer v="false" />
+        </entityDependency>
+      </dependencies>
+    </entityProvider>
+    <entityField>
+      <name>CONTEXT_NAME</name>
+      <title>Module</title>
+      <state>READONLY</state>
+    </entityField>
+    <entityField>
+      <name>SELECTION_TITLE</name>
+      <title>Name</title>
+      <state>READONLY</state>
+    </entityField>
+  </entityFields>
+  <recordContainers>
+    <jDitoRecordContainer>
+      <name>jdito</name>
+      <contentProcess>%aditoprj%/entity/StoredSelection_entity/recordcontainers/jdito/contentProcess.js</contentProcess>
+      <recordFields>
+        <element>UID.value</element>
+        <element>CONTEXT_NAME.value</element>
+        <element>SELECTION_TITLE.value</element>
+      </recordFields>
+    </jDitoRecordContainer>
+  </recordContainers>
+</entity>
diff --git a/entity/StoredSelection_entity/recordcontainers/jdito/contentProcess.js b/entity/StoredSelection_entity/recordcontainers/jdito/contentProcess.js
index cc4302b632d9e783738d848ca60f0f01ebdc058d..d92a27b39c76caada2055333b64b68dcef957d0d 100644
--- a/entity/StoredSelection_entity/recordcontainers/jdito/contentProcess.js
+++ b/entity/StoredSelection_entity/recordcontainers/jdito/contentProcess.js
@@ -1,28 +1,28 @@
-import("system.result");
-import("system.pack");
-import("system.util");
-import("system.vars");
-
-var records = [];
-if (vars.exists("$param.Base64String_param") && vars.get("$param.Base64String_param"))
-{
-    var codedSelections = pack.gunzip(vars.get("$param.Base64String_param"));
-
-    var selections = new XML(util.decodeBase64String(codedSelections));
-    selections = selections.FRAME;
-    for (let i in selections)
-    {
-        context = selections[i];
-        var contextName = context.NAME;
-        if (contextName)
-        {
-            var title = context.STORE.(ID == "#STORE_SAVED").ELEMENT.TITLE;
-            for (let ii in title)
-            {
-                records.push([(contextName + title[ii]), contextName, title[ii]]);
-            }
-        }
-    }
-}
-
+import("system.result");
+import("system.pack");
+import("system.util");
+import("system.vars");
+
+var records = [];
+if (vars.exists("$param.Base64String_param") && vars.get("$param.Base64String_param"))
+{
+    var codedSelections = pack.gunzip(vars.get("$param.Base64String_param"));
+
+    var selections = new XML(util.decodeBase64String(codedSelections));
+    selections = selections.FRAME;
+    for (let i in selections)
+    {
+        context = selections[i];
+        var contextName = context.NAME;
+        if (contextName)
+        {
+            var title = context.STORE.(ID == "#STORE_SAVED").ELEMENT.TITLE;
+            for (let ii in title)
+            {
+                records.push([(contextName + title[ii]), contextName, title[ii]]);
+            }
+        }
+    }
+}
+
 result.object(records);
\ No newline at end of file
diff --git a/neonContext/Employee/Employee.aod b/neonContext/Employee/Employee.aod
index 1d7640c1878336cea3c0cd2eb9b10be458256954..9dd4dd642bc410be26be22a52ccd6fc95ebab569 100644
--- a/neonContext/Employee/Employee.aod
+++ b/neonContext/Employee/Employee.aod
@@ -1,38 +1,38 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0">
-  <name>Employee</name>
-  <title>Employee</title>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <mainview>EmployeeMain_view</mainview>
-  <filterview>EmployeeFilter_view</filterview>
-  <editview>EmployeeEdit_view</editview>
-  <preview>EmployeePreview_view</preview>
-  <lookupview>EmployeeLookup_view</lookupview>
-  <entity>Employee_entity</entity>
-  <references>
-    <neonViewReference>
-      <name>51816f14-17da-4c96-80d8-f3b5280863b8</name>
-      <view>EmployeeFilter_view</view>
-    </neonViewReference>
-    <neonViewReference>
-      <name>91c2bbc7-89fb-4688-881e-6fa21e96b211</name>
-      <view>EmployeeEdit_view</view>
-    </neonViewReference>
-    <neonViewReference>
-      <name>6a36e3cf-5918-4c60-94d9-a3a7ed50ffce</name>
-      <view>EmployeePreview_view</view>
-    </neonViewReference>
-    <neonViewReference>
-      <name>215e8e26-662f-45f6-9c61-c0b0b1129e66</name>
-      <view>EmployeeMain_view</view>
-    </neonViewReference>
-    <neonViewReference>
-      <name>a01b0910-cd32-4fa7-a739-0b9eb19debc2</name>
-      <view>EmployeePassword_view</view>
-    </neonViewReference>
-    <neonViewReference>
-      <name>3427f53f-9201-495c-a37c-b2c9b33eb123</name>
-      <view>EmployeeLookup_view</view>
-    </neonViewReference>
-  </references>
-</neonContext>
+<?xml version="1.0" encoding="UTF-8"?>
+<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0">
+  <name>Employee</name>
+  <title>Employee</title>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <mainview>EmployeeMain_view</mainview>
+  <filterview>EmployeeFilter_view</filterview>
+  <editview>EmployeeEdit_view</editview>
+  <preview>EmployeePreview_view</preview>
+  <lookupview>EmployeeLookup_view</lookupview>
+  <entity>Employee_entity</entity>
+  <references>
+    <neonViewReference>
+      <name>51816f14-17da-4c96-80d8-f3b5280863b8</name>
+      <view>EmployeeFilter_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>91c2bbc7-89fb-4688-881e-6fa21e96b211</name>
+      <view>EmployeeEdit_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>6a36e3cf-5918-4c60-94d9-a3a7ed50ffce</name>
+      <view>EmployeePreview_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>215e8e26-662f-45f6-9c61-c0b0b1129e66</name>
+      <view>EmployeeMain_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>a01b0910-cd32-4fa7-a739-0b9eb19debc2</name>
+      <view>EmployeePassword_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>3427f53f-9201-495c-a37c-b2c9b33eb123</name>
+      <view>EmployeeLookup_view</view>
+    </neonViewReference>
+  </references>
+</neonContext>
diff --git a/neonContext/EmployeeRole/EmployeeRole.aod b/neonContext/EmployeeRole/EmployeeRole.aod
index 28bfe0b0c7e712c468bea65fcabd675c9b7a5839..436cf33ca9e7a829e908e1d8f4a26638703a7c93 100644
--- a/neonContext/EmployeeRole/EmployeeRole.aod
+++ b/neonContext/EmployeeRole/EmployeeRole.aod
@@ -1,16 +1,16 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0">
-  <name>EmployeeRole</name>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <entity>EmployeeRole_entity</entity>
-  <references>
-    <neonViewReference>
-      <name>fd4de342-238b-494e-a85b-ff08e3f065b9</name>
-      <view>EmployeeRoleFilter_view</view>
-    </neonViewReference>
-    <neonViewReference>
-      <name>6ec0af90-47aa-4f94-8e05-7c535bd4c965</name>
-      <view>EmployeeRoleEdit_view</view>
-    </neonViewReference>
-  </references>
-</neonContext>
+<?xml version="1.0" encoding="UTF-8"?>
+<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0">
+  <name>EmployeeRole</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <entity>EmployeeRole_entity</entity>
+  <references>
+    <neonViewReference>
+      <name>fd4de342-238b-494e-a85b-ff08e3f065b9</name>
+      <view>EmployeeRoleFilter_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>6ec0af90-47aa-4f94-8e05-7c535bd4c965</name>
+      <view>EmployeeRoleEdit_view</view>
+    </neonViewReference>
+  </references>
+</neonContext>
diff --git a/neonContext/StoredSelection/StoredSelection.aod b/neonContext/StoredSelection/StoredSelection.aod
index cda8fb531125f8b1ff9b45ab3179e560d8db60f3..b758aed2aa3f95619ca280233109a7d76774ea31 100644
--- a/neonContext/StoredSelection/StoredSelection.aod
+++ b/neonContext/StoredSelection/StoredSelection.aod
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0">
-  <name>StoredSelection</name>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <entity>StoredSelection_entity</entity>
-  <references>
-    <neonViewReference>
-      <name>8ab7727b-5dc7-47bb-9034-079d84ede3a3</name>
-      <view>StoredSelectionFilter_view</view>
-    </neonViewReference>
-  </references>
-</neonContext>
+<?xml version="1.0" encoding="UTF-8"?>
+<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0">
+  <name>StoredSelection</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <entity>StoredSelection_entity</entity>
+  <references>
+    <neonViewReference>
+      <name>8ab7727b-5dc7-47bb-9034-079d84ede3a3</name>
+      <view>StoredSelectionFilter_view</view>
+    </neonViewReference>
+  </references>
+</neonContext>
diff --git a/neonView/EmployeeEdit_view/EmployeeEdit_view.aod b/neonView/EmployeeEdit_view/EmployeeEdit_view.aod
index 5dfcad7f88b0b706d27c92a456ae73c154fbbce1..9d89615fa4e2538be132137725f8fdf77e50b3c6 100644
--- a/neonView/EmployeeEdit_view/EmployeeEdit_view.aod
+++ b/neonView/EmployeeEdit_view/EmployeeEdit_view.aod
@@ -1,60 +1,60 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
-  <name>EmployeeEdit_view</name>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <layout>
-    <boxLayout>
-      <name>layout</name>
-    </boxLayout>
-  </layout>
-  <children>
-    <genericViewTemplate>
-      <name>Generic</name>
-      <editMode v="true" />
-      <entityField>#ENTITY</entityField>
-      <fields>
-        <entityFieldLink>
-          <name>fdd5320e-a8c0-4043-a88e-aeba1ca02cd1</name>
-          <entityField>UID</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>9170856b-45c2-4d8a-864d-4db36bfe4a8c</name>
-          <entityField>ISACTIVE</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>1925ef51-54a8-41e2-aa78-6d95d1ee4b99</name>
-          <entityField>CONTACT_ID</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>7d36467f-8b79-4647-b8e5-5759bdbf37a7</name>
-          <entityField>FIRSTNAME</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>00a2dedb-67f5-4662-b053-bf841b30e365</name>
-          <entityField>LASTNAME</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>6155e6b7-ee2c-45b4-87f5-9e506ffc5775</name>
-          <entityField>EMAIL_ADDRESS</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>8cffaf75-f2dc-42c5-95d7-1ce1e4927d8a</name>
-          <entityField>DESCRIPTION</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>4ad9c1aa-37a9-46f9-a566-94e5be5c2a7f</name>
-          <entityField>PASSWORD</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>5381db3a-762d-439a-b41b-e4e67edc2099</name>
-          <entityField>CONFIRM_PASSWORD</entityField>
-        </entityFieldLink>
-      </fields>
-    </genericViewTemplate>
-    <neonViewReference>
-      <name>af8112a3-78d3-436f-b665-ebce595a7c24</name>
-      <entityField>EmployeeRoles</entityField>
-      <view>EmployeeRoleEdit_view</view>
-    </neonViewReference>
-  </children>
-</neonView>
+<?xml version="1.0" encoding="UTF-8"?>
+<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
+  <name>EmployeeEdit_view</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <layout>
+    <boxLayout>
+      <name>layout</name>
+    </boxLayout>
+  </layout>
+  <children>
+    <genericViewTemplate>
+      <name>Generic</name>
+      <editMode v="true" />
+      <entityField>#ENTITY</entityField>
+      <fields>
+        <entityFieldLink>
+          <name>fdd5320e-a8c0-4043-a88e-aeba1ca02cd1</name>
+          <entityField>UID</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>9170856b-45c2-4d8a-864d-4db36bfe4a8c</name>
+          <entityField>ISACTIVE</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>1925ef51-54a8-41e2-aa78-6d95d1ee4b99</name>
+          <entityField>CONTACT_ID</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>7d36467f-8b79-4647-b8e5-5759bdbf37a7</name>
+          <entityField>FIRSTNAME</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>00a2dedb-67f5-4662-b053-bf841b30e365</name>
+          <entityField>LASTNAME</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>6155e6b7-ee2c-45b4-87f5-9e506ffc5775</name>
+          <entityField>EMAIL_ADDRESS</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>8cffaf75-f2dc-42c5-95d7-1ce1e4927d8a</name>
+          <entityField>DESCRIPTION</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>4ad9c1aa-37a9-46f9-a566-94e5be5c2a7f</name>
+          <entityField>PASSWORD</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>5381db3a-762d-439a-b41b-e4e67edc2099</name>
+          <entityField>CONFIRM_PASSWORD</entityField>
+        </entityFieldLink>
+      </fields>
+    </genericViewTemplate>
+    <neonViewReference>
+      <name>af8112a3-78d3-436f-b665-ebce595a7c24</name>
+      <entityField>EmployeeRoles</entityField>
+      <view>EmployeeRoleEdit_view</view>
+    </neonViewReference>
+  </children>
+</neonView>
diff --git a/neonView/EmployeeFilter_view/EmployeeFilter_view.aod b/neonView/EmployeeFilter_view/EmployeeFilter_view.aod
index f25bea5ddd67b0be55f5d320f3787636b4314e8d..a11de42475c354c9b1c019cd96f898b0cf038fa8 100644
--- a/neonView/EmployeeFilter_view/EmployeeFilter_view.aod
+++ b/neonView/EmployeeFilter_view/EmployeeFilter_view.aod
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
-  <name>EmployeeFilter_view</name>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <filterable v="true" />
-  <layout>
-    <boxLayout>
-      <name>layout</name>
-    </boxLayout>
-  </layout>
-  <children>
-    <tableViewTemplate>
-      <name>Employees</name>
-      <entityField>#ENTITY</entityField>
-      <columns>
-        <neonTableColumn>
-          <name>15185ef0-5402-43c4-b5c9-1e0e836ef1c3</name>
-          <entityField>IMAGE</entityField>
-        </neonTableColumn>
-        <neonTableColumn>
-          <name>3e3552f9-9591-45ae-a0bb-a85210c2b382</name>
-          <entityField>UID</entityField>
-        </neonTableColumn>
-        <neonTableColumn>
-          <name>307dfdad-a0b2-436f-b8a1-9825821dba0c</name>
-          <entityField>ISACTIVE</entityField>
-        </neonTableColumn>
-        <neonTableColumn>
-          <name>18b974f1-81ea-4ca0-83bf-a1505f763446</name>
-          <entityField>FIRSTNAME</entityField>
-        </neonTableColumn>
-        <neonTableColumn>
-          <name>27c4199c-157a-4c3e-a851-01aa1d82dfd2</name>
-          <entityField>LASTNAME</entityField>
-        </neonTableColumn>
-      </columns>
-    </tableViewTemplate>
-  </children>
-</neonView>
+<?xml version="1.0" encoding="UTF-8"?>
+<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
+  <name>EmployeeFilter_view</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <filterable v="true" />
+  <layout>
+    <boxLayout>
+      <name>layout</name>
+    </boxLayout>
+  </layout>
+  <children>
+    <tableViewTemplate>
+      <name>Employees</name>
+      <entityField>#ENTITY</entityField>
+      <columns>
+        <neonTableColumn>
+          <name>15185ef0-5402-43c4-b5c9-1e0e836ef1c3</name>
+          <entityField>IMAGE</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>3e3552f9-9591-45ae-a0bb-a85210c2b382</name>
+          <entityField>UID</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>307dfdad-a0b2-436f-b8a1-9825821dba0c</name>
+          <entityField>ISACTIVE</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>18b974f1-81ea-4ca0-83bf-a1505f763446</name>
+          <entityField>FIRSTNAME</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>27c4199c-157a-4c3e-a851-01aa1d82dfd2</name>
+          <entityField>LASTNAME</entityField>
+        </neonTableColumn>
+      </columns>
+    </tableViewTemplate>
+  </children>
+</neonView>
diff --git a/neonView/EmployeeMain_view/EmployeeMain_view.aod b/neonView/EmployeeMain_view/EmployeeMain_view.aod
index da3c34385d7b9283015b3a6f54b0f87271893f1a..ce9851ad9aed43497e71f8f2ca8afff081a3bc5b 100644
--- a/neonView/EmployeeMain_view/EmployeeMain_view.aod
+++ b/neonView/EmployeeMain_view/EmployeeMain_view.aod
@@ -1,43 +1,43 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
-  <name>EmployeeMain_view</name>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <layout>
-    <masterSlaveLayout>
-      <name>layout</name>
-      <master>f9ae631b-48ad-4d7c-a3a1-6cb00230e5c7</master>
-    </masterSlaveLayout>
-  </layout>
-  <children>
-    <neonViewReference>
-      <name>f9ae631b-48ad-4d7c-a3a1-6cb00230e5c7</name>
-      <entityField>#ENTITY</entityField>
-      <view>EmployeePreview_view</view>
-    </neonViewReference>
-    <neonViewReference>
-      <name>79a01c28-1eaa-4974-babd-fb6e4d59471b</name>
-      <entityField>EmployeeRoles</entityField>
-      <view>EmployeeRoleFilter_view</view>
-    </neonViewReference>
-    <neonViewReference>
-      <name>7164f8cd-3892-4694-92ad-fc45afac68f1</name>
-      <entityField>Attributes</entityField>
-      <view>AttributeRelationFilter_view</view>
-    </neonViewReference>
-    <neonViewReference>
-      <name>68e54801-e68f-4797-97d2-368b4b82a7e4</name>
-      <entityField>AttributeTree</entityField>
-      <view>AttributeRelationTree_view</view>
-    </neonViewReference>
-    <neonViewReference>
-      <name>169d3ae7-d688-42fd-9097-77bbd9bfb81f</name>
-      <entityField>Documents</entityField>
-      <view>DocumentFilter_view</view>
-    </neonViewReference>
-    <neonViewReference>
-      <name>aaca4c8c-7953-43d8-9390-53b78d86863a</name>
-      <entityField>StoredSelections</entityField>
-      <view>StoredSelectionFilter_view</view>
-    </neonViewReference>
-  </children>
-</neonView>
+<?xml version="1.0" encoding="UTF-8"?>
+<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
+  <name>EmployeeMain_view</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <layout>
+    <masterSlaveLayout>
+      <name>layout</name>
+      <master>f9ae631b-48ad-4d7c-a3a1-6cb00230e5c7</master>
+    </masterSlaveLayout>
+  </layout>
+  <children>
+    <neonViewReference>
+      <name>f9ae631b-48ad-4d7c-a3a1-6cb00230e5c7</name>
+      <entityField>#ENTITY</entityField>
+      <view>EmployeePreview_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>79a01c28-1eaa-4974-babd-fb6e4d59471b</name>
+      <entityField>EmployeeRoles</entityField>
+      <view>EmployeeRoleFilter_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>7164f8cd-3892-4694-92ad-fc45afac68f1</name>
+      <entityField>Attributes</entityField>
+      <view>AttributeRelationFilter_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>68e54801-e68f-4797-97d2-368b4b82a7e4</name>
+      <entityField>AttributeTree</entityField>
+      <view>AttributeRelationTree_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>169d3ae7-d688-42fd-9097-77bbd9bfb81f</name>
+      <entityField>Documents</entityField>
+      <view>DocumentFilter_view</view>
+    </neonViewReference>
+    <neonViewReference>
+      <name>aaca4c8c-7953-43d8-9390-53b78d86863a</name>
+      <entityField>StoredSelections</entityField>
+      <view>StoredSelectionFilter_view</view>
+    </neonViewReference>
+  </children>
+</neonView>
diff --git a/neonView/EmployeePassword_view/EmployeePassword_view.aod b/neonView/EmployeePassword_view/EmployeePassword_view.aod
index 7a3c199fcca35cb5f9fca935d3f499b0c3a20fc2..731d112028ca26d6f7c8d66fba730c9a5240f45a 100644
--- a/neonView/EmployeePassword_view/EmployeePassword_view.aod
+++ b/neonView/EmployeePassword_view/EmployeePassword_view.aod
@@ -1,27 +1,27 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
-  <name>EmployeePassword_view</name>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <layout>
-    <boxLayout>
-      <name>layout</name>
-    </boxLayout>
-  </layout>
-  <children>
-    <genericViewTemplate>
-      <name>Password</name>
-      <editMode v="true" />
-      <entityField>#ENTITY</entityField>
-      <fields>
-        <entityFieldLink>
-          <name>632294e8-f9ec-4bd1-afe4-87e3b5fc84c4</name>
-          <entityField>PASSWORD</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>66a7726a-c226-4d74-95a4-ea88950920bf</name>
-          <entityField>CONFIRM_PASSWORD</entityField>
-        </entityFieldLink>
-      </fields>
-    </genericViewTemplate>
-  </children>
-</neonView>
+<?xml version="1.0" encoding="UTF-8"?>
+<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
+  <name>EmployeePassword_view</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <layout>
+    <boxLayout>
+      <name>layout</name>
+    </boxLayout>
+  </layout>
+  <children>
+    <genericViewTemplate>
+      <name>Password</name>
+      <editMode v="true" />
+      <entityField>#ENTITY</entityField>
+      <fields>
+        <entityFieldLink>
+          <name>632294e8-f9ec-4bd1-afe4-87e3b5fc84c4</name>
+          <entityField>PASSWORD</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>66a7726a-c226-4d74-95a4-ea88950920bf</name>
+          <entityField>CONFIRM_PASSWORD</entityField>
+        </entityFieldLink>
+      </fields>
+    </genericViewTemplate>
+  </children>
+</neonView>
diff --git a/neonView/EmployeePreview_view/EmployeePreview_view.aod b/neonView/EmployeePreview_view/EmployeePreview_view.aod
index 57ce49321eeebbc1e943e60326600cb928b92344..cbad6667101afd8d381dcc04c3dca3fdb1cf05ba 100644
--- a/neonView/EmployeePreview_view/EmployeePreview_view.aod
+++ b/neonView/EmployeePreview_view/EmployeePreview_view.aod
@@ -1,46 +1,46 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
-  <name>EmployeePreview_view</name>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <layout>
-    <boxLayout>
-      <name>layout</name>
-    </boxLayout>
-  </layout>
-  <children>
-    <cardViewTemplate>
-      <name>Header</name>
-      <iconField>IMAGE</iconField>
-      <titleField>NAME_fieldGroup</titleField>
-      <subtitleField>UID</subtitleField>
-      <entityField>#ENTITY</entityField>
-    </cardViewTemplate>
-    <genericViewTemplate>
-      <name>Info</name>
-      <showDrawer v="true" />
-      <entityField>#ENTITY</entityField>
-      <fields>
-        <entityFieldLink>
-          <name>68755289-a351-4915-8626-52f023e237f8</name>
-          <entityField>ISACTIVE</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>a5f8b519-26d8-4824-b9cf-9119c03b1bd8</name>
-          <entityField>CONTACT_ID</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>0bda9209-1437-49eb-98b7-6edea9c6836a</name>
-          <entityField>DEPARTMENT</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>d9786e3d-5364-4075-a08d-0d4ea91c4728</name>
-          <entityField>EMAIL_ADDRESS</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>79cd6a97-6caf-4acb-81af-028b94f33e8f</name>
-          <entityField>DESCRIPTION</entityField>
-        </entityFieldLink>
-      </fields>
-    </genericViewTemplate>
-  </children>
-</neonView>
+<?xml version="1.0" encoding="UTF-8"?>
+<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
+  <name>EmployeePreview_view</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <layout>
+    <boxLayout>
+      <name>layout</name>
+    </boxLayout>
+  </layout>
+  <children>
+    <cardViewTemplate>
+      <name>Header</name>
+      <iconField>IMAGE</iconField>
+      <titleField>NAME_fieldGroup</titleField>
+      <subtitleField>UID</subtitleField>
+      <entityField>#ENTITY</entityField>
+    </cardViewTemplate>
+    <genericViewTemplate>
+      <name>Info</name>
+      <showDrawer v="true" />
+      <entityField>#ENTITY</entityField>
+      <fields>
+        <entityFieldLink>
+          <name>68755289-a351-4915-8626-52f023e237f8</name>
+          <entityField>ISACTIVE</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>a5f8b519-26d8-4824-b9cf-9119c03b1bd8</name>
+          <entityField>CONTACT_ID</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>0bda9209-1437-49eb-98b7-6edea9c6836a</name>
+          <entityField>DEPARTMENT</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>d9786e3d-5364-4075-a08d-0d4ea91c4728</name>
+          <entityField>EMAIL_ADDRESS</entityField>
+        </entityFieldLink>
+        <entityFieldLink>
+          <name>79cd6a97-6caf-4acb-81af-028b94f33e8f</name>
+          <entityField>DESCRIPTION</entityField>
+        </entityFieldLink>
+      </fields>
+    </genericViewTemplate>
+  </children>
+</neonView>
diff --git a/neonView/EmployeeRoleFilter_view/EmployeeRoleFilter_view.aod b/neonView/EmployeeRoleFilter_view/EmployeeRoleFilter_view.aod
index 9fc81ddf21b067bfd7f7653c9d1a8b66f99b4d9a..80d5076129ade0ac6b9dfa8481a146c81c1e3200 100644
--- a/neonView/EmployeeRoleFilter_view/EmployeeRoleFilter_view.aod
+++ b/neonView/EmployeeRoleFilter_view/EmployeeRoleFilter_view.aod
@@ -1,23 +1,23 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
-  <name>EmployeeRoleFilter_view</name>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <layout>
-    <boxLayout>
-      <name>layout</name>
-    </boxLayout>
-  </layout>
-  <children>
-    <tableViewTemplate>
-      <name>Table</name>
-      <autoNewRow v="true" />
-      <entityField>#ENTITY</entityField>
-      <columns>
-        <neonTableColumn>
-          <name>ab1c8d39-fc29-42e8-8b8e-3557d544b272</name>
-          <entityField>ROLE</entityField>
-        </neonTableColumn>
-      </columns>
-    </tableViewTemplate>
-  </children>
-</neonView>
+<?xml version="1.0" encoding="UTF-8"?>
+<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
+  <name>EmployeeRoleFilter_view</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <layout>
+    <boxLayout>
+      <name>layout</name>
+    </boxLayout>
+  </layout>
+  <children>
+    <tableViewTemplate>
+      <name>Table</name>
+      <autoNewRow v="true" />
+      <entityField>#ENTITY</entityField>
+      <columns>
+        <neonTableColumn>
+          <name>ab1c8d39-fc29-42e8-8b8e-3557d544b272</name>
+          <entityField>ROLE</entityField>
+        </neonTableColumn>
+      </columns>
+    </tableViewTemplate>
+  </children>
+</neonView>
diff --git a/neonView/ObjectTree_view/ObjectTree_view.aod b/neonView/ObjectTree_view/ObjectTree_view.aod
index d2be4d640df1e12b9e0ccabe2772d46fe3cbea30..4395ff39605789993575fb77fab8be23ff01bf2e 100644
--- a/neonView/ObjectTree_view/ObjectTree_view.aod
+++ b/neonView/ObjectTree_view/ObjectTree_view.aod
@@ -11,6 +11,7 @@
     <treeViewTemplate>
       <name>ObjectRelations</name>
       <parentField>PARENT_ID</parentField>
+      <nodeExpandedField>EXPANDED</nodeExpandedField>
       <titleField>TITLE</titleField>
       <descriptionField>DESCRIPTION</descriptionField>
       <iconField>ICON</iconField>
diff --git a/neonView/StoredSelectionFilter_view/StoredSelectionFilter_view.aod b/neonView/StoredSelectionFilter_view/StoredSelectionFilter_view.aod
index f9352814ab348ec447bc773953efbfdedf91bcd3..0fc464bb786585f4a76ea8683c3f7d21c835bab1 100644
--- a/neonView/StoredSelectionFilter_view/StoredSelectionFilter_view.aod
+++ b/neonView/StoredSelectionFilter_view/StoredSelectionFilter_view.aod
@@ -1,26 +1,26 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
-  <name>StoredSelectionFilter_view</name>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <layout>
-    <boxLayout>
-      <name>layout</name>
-    </boxLayout>
-  </layout>
-  <children>
-    <tableViewTemplate>
-      <name>Table</name>
-      <entityField>#ENTITY</entityField>
-      <columns>
-        <neonTableColumn>
-          <name>713574de-2d9c-4006-93a3-3860fb145c26</name>
-          <entityField>CONTEXT_NAME</entityField>
-        </neonTableColumn>
-        <neonTableColumn>
-          <name>4cc4d5ff-24cf-46d9-9941-cda11e445a17</name>
-          <entityField>SELECTION_TITLE</entityField>
-        </neonTableColumn>
-      </columns>
-    </tableViewTemplate>
-  </children>
-</neonView>
+<?xml version="1.0" encoding="UTF-8"?>
+<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1">
+  <name>StoredSelectionFilter_view</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <layout>
+    <boxLayout>
+      <name>layout</name>
+    </boxLayout>
+  </layout>
+  <children>
+    <tableViewTemplate>
+      <name>Table</name>
+      <entityField>#ENTITY</entityField>
+      <columns>
+        <neonTableColumn>
+          <name>713574de-2d9c-4006-93a3-3860fb145c26</name>
+          <entityField>CONTEXT_NAME</entityField>
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>4cc4d5ff-24cf-46d9-9941-cda11e445a17</name>
+          <entityField>SELECTION_TITLE</entityField>
+        </neonTableColumn>
+      </columns>
+    </tableViewTemplate>
+  </children>
+</neonView>
diff --git a/others/db_changes/Data_alias/basic/2019.2/add_ObjectRelation_type.xml b/others/db_changes/Data_alias/basic/2019.2/add_ObjectRelation_type.xml
index 1fe970cb978fa75867033eedcd40729919b23316..89d9e3cf4a13e7a2472166adb1f37e6889bd93b1 100644
--- a/others/db_changes/Data_alias/basic/2019.2/add_ObjectRelation_type.xml
+++ b/others/db_changes/Data_alias/basic/2019.2/add_ObjectRelation_type.xml
@@ -17,6 +17,9 @@
             <column name="SIDE" type="INTEGER">
                 <constraints nullable="false"/>
             </column>
+            <column name="HIERARCHY" type="INTEGER">
+                <constraints nullable="false"/>
+            </column>
         </createTable>
         
         <addColumn tableName="AB_OBJECTRELATION">
@@ -38,6 +41,7 @@
             <column name="RELATION_TITLE" value="parent company"/>
             <column name="RELATION_TYPE" value="a054875d-b9a2-499d-877b-ccec31358324"/>
             <column name="SIDE" valueNumeric="1"/>
+            <column name="HIERARCHY" valueNumeric="1"/>
         </insert>
         <insert tableName="AB_OBJECTRELATIONTYPE">
             <column name="AB_OBJECTRELATIONTYPEID" value="259babbd-7827-44d4-b9ec-8245d27b5f70"/>
@@ -45,6 +49,7 @@
             <column name="RELATION_TITLE" value="subsidiary"/>
             <column name="RELATION_TYPE" value="a054875d-b9a2-499d-877b-ccec31358324"/>
             <column name="SIDE" valueNumeric="2"/>
+            <column name="HIERARCHY" valueNumeric="1"/>
         </insert>
         
         <insert tableName="AB_OBJECTRELATIONTYPE">
@@ -53,6 +58,7 @@
             <column name="RELATION_TITLE" value="parent of"/>
             <column name="RELATION_TYPE" value="52f3ec58-71d5-469f-85e4-37ef2eeeb3e0"/>
             <column name="SIDE" valueNumeric="1"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
         <insert tableName="AB_OBJECTRELATIONTYPE">
             <column name="AB_OBJECTRELATIONTYPEID" value="b3b85332-1c86-4cd8-a3b9-34c49c51f01a"/>
@@ -60,6 +66,7 @@
             <column name="RELATION_TITLE" value="child of"/>
             <column name="RELATION_TYPE" value="52f3ec58-71d5-469f-85e4-37ef2eeeb3e0"/>
             <column name="SIDE" valueNumeric="2"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
 
         <insert tableName="AB_OBJECTRELATIONTYPE">
@@ -68,6 +75,7 @@
             <column name="RELATION_TITLE" value="supports"/>
             <column name="RELATION_TYPE" value="5ab4d256-4220-4c28-88d6-1db01e2f4667"/>
             <column name="SIDE" valueNumeric="1"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
         <insert tableName="AB_OBJECTRELATIONTYPE">
             <column name="AB_OBJECTRELATIONTYPEID" value="a51e23c0-d44a-4e39-a79b-7a357fb79cc2"/>
@@ -75,6 +83,7 @@
             <column name="RELATION_TITLE" value="supported by"/>
             <column name="RELATION_TYPE" value="5ab4d256-4220-4c28-88d6-1db01e2f4667"/>
             <column name="SIDE" valueNumeric="2"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
     
         <insert tableName="AB_OBJECTRELATIONTYPE">
@@ -83,6 +92,7 @@
             <column name="RELATION_TITLE" value="supervisor of"/>
             <column name="RELATION_TYPE" value="4df4160d-6efc-43b3-9b02-710ab3d0228c"/>
             <column name="SIDE" valueNumeric="1"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
         <insert tableName="AB_OBJECTRELATIONTYPE">
             <column name="AB_OBJECTRELATIONTYPEID" value="0a47c346-9b6f-4cdd-8c38-77800d7012f5"/>
@@ -90,6 +100,7 @@
             <column name="RELATION_TITLE" value="reports to"/>
             <column name="RELATION_TYPE" value="4df4160d-6efc-43b3-9b02-710ab3d0228c"/>
             <column name="SIDE" valueNumeric="2"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
     
         <insert tableName="AB_OBJECTRELATIONTYPE">
@@ -98,6 +109,7 @@
             <column name="RELATION_TITLE" value="promotion target of"/>
             <column name="RELATION_TYPE" value="ddad6aa3-267b-4784-afbb-98242218fcf5"/>
             <column name="SIDE" valueNumeric="1"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
         <insert tableName="AB_OBJECTRELATIONTYPE">
             <column name="AB_OBJECTRELATIONTYPEID" value="e397b595-38ae-4365-908e-75ee388838eb"/>
@@ -105,6 +117,7 @@
             <column name="RELATION_TITLE" value="solicits"/>
             <column name="RELATION_TYPE" value="ddad6aa3-267b-4784-afbb-98242218fcf5"/>
             <column name="SIDE" valueNumeric="2"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
 
         <insert tableName="AB_OBJECTRELATIONTYPE">
@@ -113,6 +126,7 @@
             <column name="RELATION_TITLE" value="competitor"/>
             <column name="RELATION_TYPE" value="032ebe0a-7204-4eec-82a2-cb13b65850d7"/>
             <column name="SIDE" valueNumeric="1"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
         
         <insert tableName="AB_OBJECTRELATIONTYPE">
@@ -121,6 +135,7 @@
             <column name="RELATION_TITLE" value="society"/>
             <column name="RELATION_TYPE" value="9f65f915-2767-40c4-9e7b-e818e915648f"/>
             <column name="SIDE" valueNumeric="1"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
         <insert tableName="AB_OBJECTRELATIONTYPE">
             <column name="AB_OBJECTRELATIONTYPEID" value="fa879afd-b2c5-4eee-9799-d63c6764b348"/>
@@ -128,6 +143,7 @@
             <column name="RELATION_TITLE" value="member"/>
             <column name="RELATION_TYPE" value="9f65f915-2767-40c4-9e7b-e818e915648f"/>
             <column name="SIDE" valueNumeric="2"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
 
         <insert tableName="AB_OBJECTRELATIONTYPE">
@@ -136,6 +152,7 @@
             <column name="RELATION_TITLE" value="acquainted with"/>
             <column name="RELATION_TYPE" value="84120fad-e7a2-4961-8c29-d00da41efe48"/>
             <column name="SIDE" valueNumeric="1"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
 
         <insert tableName="AB_OBJECTRELATIONTYPE">
@@ -144,6 +161,7 @@
             <column name="RELATION_TITLE" value="collaboration with"/>
             <column name="RELATION_TYPE" value="091d866f-67e8-4fd6-afdc-e40d0f2be224"/>
             <column name="SIDE" valueNumeric="1"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
         
         <insert tableName="AB_OBJECTRELATIONTYPE">
@@ -152,6 +170,7 @@
             <column name="RELATION_TITLE" value="grandparents of"/>
             <column name="RELATION_TYPE" value="f36c69c2-6d03-45ef-81a0-f9118ce3f4c6"/>
             <column name="SIDE" valueNumeric="1"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
         <insert tableName="AB_OBJECTRELATIONTYPE">
             <column name="AB_OBJECTRELATIONTYPEID" value="a2296f93-2371-4ab8-9f29-ef0795d1e9b2"/>
@@ -159,6 +178,7 @@
             <column name="RELATION_TITLE" value="ankle of"/>
             <column name="RELATION_TYPE" value="f36c69c2-6d03-45ef-81a0-f9118ce3f4c6"/>
             <column name="SIDE" valueNumeric="2"/>
+            <column name="HIERARCHY" valueNumeric="0"/>
         </insert>
     </changeSet>
 </databaseChangeLog>
\ No newline at end of file
diff --git a/process/ObjectRelation_lib/ObjectRelation_lib.aod b/process/ObjectRelation_lib/ObjectRelation_lib.aod
new file mode 100644
index 0000000000000000000000000000000000000000..c3d8d4121861e2efe91eac9f3566537330729e15
--- /dev/null
+++ b/process/ObjectRelation_lib/ObjectRelation_lib.aod
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<process xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.2.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.2.0">
+  <name>ObjectRelation_lib</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <process>%aditoprj%/process/ObjectRelation_lib/process.js</process>
+  <variants>
+    <element>LIBRARY</element>
+  </variants>
+</process>
diff --git a/process/ObjectRelation_lib/process.js b/process/ObjectRelation_lib/process.js
new file mode 100644
index 0000000000000000000000000000000000000000..1220a10c17c1da3f3a6a47ad81aade677fef38e5
--- /dev/null
+++ b/process/ObjectRelation_lib/process.js
@@ -0,0 +1,77 @@
+import("system.logging");
+import("system.db");
+
+/**
+ * Class containing utility functions for ObjectRelations
+ * do not create an instance of this
+ * 
+ * @class
+ */
+function ObjectRelationUtils() {}
+
+/**
+ * Get all possible relationTypes by a objectType.
+ * Normally it only returns the id and title. If you set pFullInfo to true, you will get additional information, too.
+ * 
+ * @param {String} pObjectType the object type to load the relation types for.] 
+ * @param {Boolean} [pFullInfo=false] return also RELATION_TYPE, direction (normal, reverse, same), hierarchy, OBJECT_TYPE dest, OBJECT_TYPE source, objectrelationtypeId1, objectrelationtypeId2, side
+ * 
+ * @return {String[][]}
+ */
+ObjectRelationUtils.getPossibleRelationTypes = function(pObjectType, pFullInfo)
+{
+    var sql = " from AB_OBJECTRELATIONTYPE main \n\
+            left join AB_OBJECTRELATIONTYPE type2 on (type2.AB_OBJECTRELATIONTYPEID <> main.AB_OBJECTRELATIONTYPEID and type2.RELATION_TYPE = main.RELATION_TYPE) \n\
+            where case when type2.OBJECT_TYPE is null then ( ? = main.OBJECT_TYPE) else ( ? = type2.OBJECT_TYPE) end"
+    
+    // only id and title:
+    if (pFullInfo == undefined || pFullInfo == false)
+    {
+        pFullInfo = [];
+        
+        return (db.table(
+        ["select main.AB_OBJECTRELATIONTYPEID, main.RELATION_TITLE" + sql, 
+            [
+              [pObjectType, db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]],
+              [pObjectType, db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]],
+            ]
+        ]));
+        
+    }
+    
+    // full info:    
+    // TODO: add hierarchy
+    var relationTypes = (db.table(
+    ["select main.AB_OBJECTRELATIONTYPEID, main.RELATION_TITLE, main.RELATION_TYPE, \n\
+        case when type2.AB_OBJECTRELATIONTYPEID is null then 'same' \n\
+             when main.SIDE = 1 then 'normal'\n\
+             else 'reverse'\n\
+        end direction,\n\
+        main.HIERARCHY, \n\
+        type2.OBJECT_TYPE objectType, \n\
+        main.OBJECT_TYPE objectType, \n\
+        -- typeId of Object2\n\
+        case when main.SIDE = 1 then main.AB_OBJECTRELATIONTYPEID\n\
+             else type2.AB_OBJECTRELATIONTYPEID end objectrelationtypeId1,\n\
+        -- typeId of Object1\n\
+        case when type2.AB_OBJECTRELATIONTYPEID is null or main.SIDE = 2 then main.AB_OBJECTRELATIONTYPEID\n\
+             else type2.AB_OBJECTRELATIONTYPEID end objectrelationtypeId2, \n\
+        main.SIDE" + sql, 
+        [
+          [pObjectType, db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]],
+          [pObjectType, db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]],
+        ]
+    ]));
+
+    // switch the object types, if the direction is normal so that the first one is dest and the second one is source.
+    return relationTypes;
+    /*.map(function(relationType) 
+    {
+        if (relationType[3] == "normal")
+        {
+            return relationType.slice(0, 6).concat(relationType[7], relationType[6]);
+        }
+        
+        return relationType;
+    });*/
+}
\ No newline at end of file