diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod
index d272eef7e75b4e9371152aea19932d89ff401302..0b734992cbf469c8ad0c53e3ec90f2ef3f35c583 100644
--- a/aliasDefinition/Data_alias/Data_alias.aod
+++ b/aliasDefinition/Data_alias/Data_alias.aod
@@ -3999,137 +3999,6 @@
               </entityFieldDb>
             </entityFields>
           </entityDb>
-          <entityDb>
-            <name>ACTIVITYLINK</name>
-            <dbName></dbName>
-            <idColumn>ACTIVITYLINKID</idColumn>
-            <idGeneratorType v="0" />
-            <idGeneratorInterval v="1" />
-            <title></title>
-            <description></description>
-            <auditSyncConfig>
-              <name>auditSyncConfig</name>
-              <auditMode v="0" />
-              <syncActive v="false" />
-              <syncComplete v="true" />
-              <syncDirection v="1" />
-              <syncIds></syncIds>
-            </auditSyncConfig>
-            <entityFields>
-              <entityFieldDb>
-                <name>OBJECT_ID</name>
-                <dbName></dbName>
-                <primaryKey v="false" />
-                <columnType v="12" />
-                <size v="36" />
-                <scale v="0" />
-                <notNull v="false" />
-                <isUnique v="false" />
-                <index v="false" />
-                <documentation></documentation>
-                <title></title>
-                <description></description>
-              </entityFieldDb>
-              <entityFieldDb>
-                <name>DATE_EDIT</name>
-                <dbName></dbName>
-                <primaryKey v="false" />
-                <columnType v="93" />
-                <size v="29" />
-                <scale v="9" />
-                <notNull v="false" />
-                <isUnique v="false" />
-                <index v="false" />
-                <documentation></documentation>
-                <title></title>
-                <description></description>
-              </entityFieldDb>
-              <entityFieldDb>
-                <name>ACTIVITYLINKID</name>
-                <dbName></dbName>
-                <primaryKey v="true" />
-                <columnType v="1" />
-                <size v="36" />
-                <scale v="0" />
-                <notNull v="true" />
-                <isUnique v="true" />
-                <index v="false" />
-                <documentation></documentation>
-                <title></title>
-                <description></description>
-              </entityFieldDb>
-              <entityFieldDb>
-                <name>DATE_NEW</name>
-                <dbName></dbName>
-                <primaryKey v="false" />
-                <columnType v="93" />
-                <size v="29" />
-                <scale v="9" />
-                <notNull v="true" />
-                <isUnique v="false" />
-                <index v="false" />
-                <documentation></documentation>
-                <title></title>
-                <description></description>
-              </entityFieldDb>
-              <entityFieldDb>
-                <name>USER_NEW</name>
-                <dbName></dbName>
-                <primaryKey v="false" />
-                <columnType v="12" />
-                <size v="50" />
-                <scale v="0" />
-                <notNull v="true" />
-                <isUnique v="false" />
-                <index v="false" />
-                <documentation></documentation>
-                <title></title>
-                <description></description>
-              </entityFieldDb>
-              <entityFieldDb>
-                <name>ACTIVITY_ID</name>
-                <dbName></dbName>
-                <primaryKey v="false" />
-                <columnType v="1" />
-                <size v="36" />
-                <scale v="0" />
-                <notNull v="true" />
-                <isUnique v="false" />
-                <index v="true" />
-                <documentation></documentation>
-                <title></title>
-                <description></description>
-              </entityFieldDb>
-              <entityFieldDb>
-                <name>USER_EDIT</name>
-                <dbName></dbName>
-                <primaryKey v="false" />
-                <columnType v="12" />
-                <size v="50" />
-                <scale v="0" />
-                <notNull v="false" />
-                <isUnique v="false" />
-                <index v="false" />
-                <documentation></documentation>
-                <title></title>
-                <description></description>
-              </entityFieldDb>
-              <entityFieldDb>
-                <name>ROW_ID</name>
-                <dbName></dbName>
-                <primaryKey v="false" />
-                <columnType v="1" />
-                <size v="36" />
-                <scale v="0" />
-                <notNull v="true" />
-                <isUnique v="false" />
-                <index v="false" />
-                <documentation></documentation>
-                <title></title>
-                <description></description>
-              </entityFieldDb>
-            </entityFields>
-          </entityDb>
           <entityDb>
             <name>ACTIVITY</name>
             <dbName></dbName>
@@ -5103,9 +4972,9 @@
             </entityFields>
           </entityDb>
           <entityDb>
-            <name>AB_OBJECTREALTION</name>
+            <name>AB_OBJECTRELATION</name>
             <dbName></dbName>
-            <idColumn>AB_OBJECTREALTIONID</idColumn>
+            <idColumn>AB_OBJECTRELATIONID</idColumn>
             <idGeneratorType v="0" />
             <idGeneratorInterval v="1" />
             <title></title>
@@ -5120,41 +4989,27 @@
             </auditSyncConfig>
             <entityFields>
               <entityFieldDb>
-                <name>DATE_EDIT</name>
+                <name>OBJECT2_ROWID</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="93" />
-                <size v="29" />
-                <scale v="9" />
-                <notNull v="false" />
-                <isUnique v="false" />
-                <index v="false" />
-                <documentation></documentation>
-                <title></title>
-                <description></description>
-              </entityFieldDb>
-              <entityFieldDb>
-                <name>AB_OBJECTREALTIONID</name>
-                <dbName></dbName>
-                <primaryKey v="true" />
                 <columnType v="1" />
                 <size v="36" />
                 <scale v="0" />
                 <notNull v="true" />
-                <isUnique v="true" />
+                <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
                 <title></title>
                 <description></description>
               </entityFieldDb>
               <entityFieldDb>
-                <name>DATE_NEW</name>
+                <name>DATE_EDIT</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
                 <columnType v="93" />
                 <size v="29" />
                 <scale v="9" />
-                <notNull v="true" />
+                <notNull v="false" />
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
@@ -5162,11 +5017,11 @@
                 <description></description>
               </entityFieldDb>
               <entityFieldDb>
-                <name>USER_NEW</name>
+                <name>OBJECT2_TYPE</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
                 <columnType v="12" />
-                <size v="50" />
+                <size v="63" />
                 <scale v="0" />
                 <notNull v="true" />
                 <isUnique v="false" />
@@ -5176,13 +5031,13 @@
                 <description></description>
               </entityFieldDb>
               <entityFieldDb>
-                <name>USER_EDIT</name>
+                <name>OBJECT1_TYPE</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
                 <columnType v="12" />
                 <size v="50" />
                 <scale v="0" />
-                <notNull v="false" />
+                <notNull v="true" />
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
@@ -5190,12 +5045,12 @@
                 <description></description>
               </entityFieldDb>
               <entityFieldDb>
-                <name>OBJECT2_ROWID</name>
+                <name>DATE_NEW</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="1" />
-                <size v="63" />
-                <scale v="0" />
+                <columnType v="93" />
+                <size v="29" />
+                <scale v="9" />
                 <notNull v="true" />
                 <isUnique v="false" />
                 <index v="false" />
@@ -5204,11 +5059,11 @@
                 <description></description>
               </entityFieldDb>
               <entityFieldDb>
-                <name>OBJECT2_TYPE</name>
+                <name>USER_NEW</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
                 <columnType v="12" />
-                <size v="63" />
+                <size v="50" />
                 <scale v="0" />
                 <notNull v="true" />
                 <isUnique v="false" />
@@ -5218,11 +5073,11 @@
                 <description></description>
               </entityFieldDb>
               <entityFieldDb>
-                <name>OBJECT1_TYPE</name>
+                <name>OBJECT1_ROWID</name>
                 <dbName></dbName>
                 <primaryKey v="false" />
-                <columnType v="12" />
-                <size v="50" />
+                <columnType v="1" />
+                <size v="36" />
                 <scale v="0" />
                 <notNull v="true" />
                 <isUnique v="false" />
@@ -5232,13 +5087,27 @@
                 <description></description>
               </entityFieldDb>
               <entityFieldDb>
-                <name>OBJECT1_ROWID</name>
+                <name>AB_OBJECTRELATIONID</name>
                 <dbName></dbName>
-                <primaryKey v="false" />
+                <primaryKey v="true" />
                 <columnType v="1" />
                 <size v="36" />
                 <scale v="0" />
                 <notNull v="true" />
+                <isUnique v="true" />
+                <index v="false" />
+                <documentation></documentation>
+                <title></title>
+                <description></description>
+              </entityFieldDb>
+              <entityFieldDb>
+                <name>USER_EDIT</name>
+                <dbName></dbName>
+                <primaryKey v="false" />
+                <columnType v="12" />
+                <size v="50" />
+                <scale v="0" />
+                <notNull v="false" />
                 <isUnique v="false" />
                 <index v="false" />
                 <documentation></documentation>
diff --git a/entity/ActivityLink_entity/ActivityLink_entity.aod b/entity/ActivityLink_entity/ActivityLink_entity.aod
deleted file mode 100644
index 7f867aa5ff5c33a0046b6bfa58c8e7cc888e97b8..0000000000000000000000000000000000000000
--- a/entity/ActivityLink_entity/ActivityLink_entity.aod
+++ /dev/null
@@ -1,128 +0,0 @@
-<?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.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.1.1">
-  <name>ActivityLink_entity</name>
-  <title>Connections</title>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <recordContainer>db</recordContainer>
-  <entityFields>
-    <entityIncomingField>
-      <name>#INCOMING</name>
-    </entityIncomingField>
-    <entityField>
-      <name>DATE_EDIT</name>
-      <valueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/date_edit/valueProcess.js</valueProcess>
-    </entityField>
-    <entityField>
-      <name>DATE_NEW</name>
-      <valueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/date_new/valueProcess.js</valueProcess>
-    </entityField>
-    <entityField>
-      <name>ACTIVITY_ID</name>
-    </entityField>
-    <entityField>
-      <name>ACTIVITYLINKID</name>
-    </entityField>
-    <entityField>
-      <name>OBJECT_ID</name>
-      <title>Object</title>
-    </entityField>
-    <entityField>
-      <name>ROW_ID</name>
-      <title>Dataset</title>
-      <linkedContextProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/row_id/linkedContextProcess.js</linkedContextProcess>
-    </entityField>
-    <entityField>
-      <name>USER_EDIT</name>
-      <valueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/user_edit/valueProcess.js</valueProcess>
-    </entityField>
-    <entityField>
-      <name>USER_NEW</name>
-      <valueProcess>%aditoprj%/entity/ActivityLink_entity/entityfields/user_new/valueProcess.js</valueProcess>
-    </entityField>
-    <entityParameter>
-      <name>ActivityId_param</name>
-      <expose v="true" />
-      <triggerRecalculation v="true" />
-      <mandatory v="false" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityParameter>
-      <name>ObjectId_param</name>
-      <expose v="true" />
-      <triggerRecalculation v="true" />
-      <mandatory v="false" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityParameter>
-      <name>RowId_param</name>
-      <expose v="true" />
-      <triggerRecalculation v="true" />
-      <mandatory v="false" />
-      <description>PARAMETER</description>
-    </entityParameter>
-    <entityIncomingField>
-      <name>ActivityLink_dfi</name>
-      <fieldType>DEPENDENCY_IN</fieldType>
-      <recordContainer>db</recordContainer>
-      <dependencies>
-        <entityDependency>
-          <name>cfb56235-217f-4b2f-a17a-12798f5adf48</name>
-          <entityName>Activity_entity</entityName>
-          <fieldName>ActivityLink_dfo</fieldName>
-          <isOutgoing v="false" />
-        </entityDependency>
-      </dependencies>
-    </entityIncomingField>
-  </entityFields>
-  <recordContainers>
-    <dbRecordContainer>
-      <name>db</name>
-      <title>Connections</title>
-      <alias>Data_alias</alias>
-      <conditionProcess>%aditoprj%/entity/ActivityLink_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
-      <linkInformation>
-        <linkInformation>
-          <name>83d681de-a162-480a-8fc4-ce67d6be75af</name>
-          <tableName>ACTIVITYLINK</tableName>
-          <primaryKey>ACTIVITYLINKID</primaryKey>
-          <isUIDTable v="false" />
-          <readonly v="false" />
-        </linkInformation>
-      </linkInformation>
-      <recordFieldMappings>
-        <dbRecordFieldMapping>
-          <name>DATE_EDIT.value</name>
-          <recordfield>ACTIVITYLINK.DATE_EDIT</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>DATE_NEW.value</name>
-          <recordfield>ACTIVITYLINK.DATE_NEW</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>ACTIVITY_ID.value</name>
-          <recordfield>ACTIVITYLINK.ACTIVITY_ID</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>ACTIVITYLINKID.value</name>
-          <recordfield>ACTIVITYLINK.ACTIVITYLINKID</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>OBJECT_ID.value</name>
-          <recordfield>ACTIVITYLINK.OBJECT_ID</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>ROW_ID.value</name>
-          <recordfield>ACTIVITYLINK.ROW_ID</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>USER_EDIT.value</name>
-          <recordfield>ACTIVITYLINK.USER_EDIT</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>USER_NEW.value</name>
-          <recordfield>ACTIVITYLINK.USER_NEW</recordfield>
-        </dbRecordFieldMapping>
-      </recordFieldMappings>
-    </dbRecordContainer>
-  </recordContainers>
-</entity>
diff --git a/entity/ActivityLink_entity/entityfields/date_edit/valueProcess.js b/entity/ActivityLink_entity/entityfields/date_edit/valueProcess.js
deleted file mode 100644
index 710ac8a06a9911f82ff222c7d9d231846ca93fb2..0000000000000000000000000000000000000000
--- a/entity/ActivityLink_entity/entityfields/date_edit/valueProcess.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import("system.vars");
-import("system.result");
-import("system.neon");
-
-if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
-    result.string(vars.getString("$sys.date"));
\ No newline at end of file
diff --git a/entity/ActivityLink_entity/entityfields/date_new/valueProcess.js b/entity/ActivityLink_entity/entityfields/date_new/valueProcess.js
deleted file mode 100644
index 3a0d59096cd2de39b6098f1ed95af580dcebfce0..0000000000000000000000000000000000000000
--- a/entity/ActivityLink_entity/entityfields/date_new/valueProcess.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import("system.vars");
-import("system.result");
-import("system.neon");
-
-if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
-    result.string(vars.getString("$sys.date"));
\ No newline at end of file
diff --git a/entity/ActivityLink_entity/entityfields/user_edit/valueProcess.js b/entity/ActivityLink_entity/entityfields/user_edit/valueProcess.js
deleted file mode 100644
index 1581e18d9763043ae602b98658f87cb0a3b0c967..0000000000000000000000000000000000000000
--- a/entity/ActivityLink_entity/entityfields/user_edit/valueProcess.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import("system.vars");
-import("system.result");
-import("system.neon");
-
-if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
-    result.string(vars.getString("$sys.user"));
\ No newline at end of file
diff --git a/entity/ActivityLink_entity/entityfields/user_new/valueProcess.js b/entity/ActivityLink_entity/entityfields/user_new/valueProcess.js
deleted file mode 100644
index 7c566863b493d778b72dea7d8822f6a59333e77d..0000000000000000000000000000000000000000
--- a/entity/ActivityLink_entity/entityfields/user_new/valueProcess.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import("system.vars");
-import("system.result");
-import("system.neon");
-
-if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
-    result.string(vars.getString("$sys.user"));
\ No newline at end of file
diff --git a/entity/ActivityLink_entity/recordcontainers/db/conditionProcess.js b/entity/ActivityLink_entity/recordcontainers/db/conditionProcess.js
deleted file mode 100644
index 0555ac1c7d6cd12ced4ab49147ac3289f5a72e04..0000000000000000000000000000000000000000
--- a/entity/ActivityLink_entity/recordcontainers/db/conditionProcess.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import("system.db");
-import("system.result");
-import("Sql_lib");
-
-var cond = SqlCondition.begin()
-                       .andPrepareVars("ACTIVITYLINK.ACTIVITY_ID", "$param.ActivityId_param")
-                       .andPrepareVars("ACTIVITYLINK.ROW_ID", "$param.RowId_param")
-                       .andPrepareVars("ACTIVITYLINK.OBJECT_ID", "$param.ObjectId_param");
-
-//TODO: use a preparedCondition when available
-result.string(db.translateCondition(cond.build("1 = 1")));
\ No newline at end of file
diff --git a/entity/Activity_entity/Activity_entity.aod b/entity/Activity_entity/Activity_entity.aod
index 4d2a033ab2b205596145be901109c1844e835e61..33ed911d36e6c3012a6e0e311acdc615689e15af 100644
--- a/entity/Activity_entity/Activity_entity.aod
+++ b/entity/Activity_entity/Activity_entity.aod
@@ -148,22 +148,6 @@
       <name>USER_EDIT</name>
       <valueProcess>%aditoprj%/entity/Activity_entity/entityfields/user_edit/valueProcess.js</valueProcess>
     </entityField>
-    <entityOutgoingField>
-      <name>ActivityLink_dfo</name>
-      <title>Connections</title>
-      <fieldType>DEPENDENCY_OUT</fieldType>
-      <dependency>
-        <name>dependency</name>
-        <entityName>ActivityLink_entity</entityName>
-        <fieldName>ActivityLink_dfi</fieldName>
-      </dependency>
-      <children>
-        <entityParameter>
-          <name>ActivityId_param</name>
-          <code>%aditoprj%/entity/Activity_entity/entityfields/activitylink_dfo/children/activityid_param/code.js</code>
-        </entityParameter>
-      </children>
-    </entityOutgoingField>
     <entityParameter>
       <name>ObjectId_param</name>
       <expose v="true" />
@@ -171,20 +155,6 @@
       <mandatory v="false" />
       <documentation>%aditoprj%/entity/Activity_entity/entityfields/objectid_param/documentation.adoc</documentation>
     </entityParameter>
-    <entityField>
-      <name>ObjectId</name>
-      <title>Object</title>
-      <description>Only for displaying the param</description>
-      <state>READONLY</state>
-      <valueProcess>%aditoprj%/entity/Activity_entity/entityfields/objectid/valueProcess.js</valueProcess>
-    </entityField>
-    <entityField>
-      <name>RowId</name>
-      <title>Dataset</title>
-      <description>Only for displaying the param</description>
-      <state>READONLY</state>
-      <valueProcess>%aditoprj%/entity/Activity_entity/entityfields/rowid/valueProcess.js</valueProcess>
-    </entityField>
     <entityOutgoingField>
       <name>ActivityDocument_dfo</name>
       <title>Documents</title>
@@ -248,6 +218,34 @@
         <element>PROCESS</element>
       </onValueChangeTypes>
     </entityField>
+    <entityIncomingField>
+      <name>ActivityById_dfi</name>
+      <fieldType>DEPENDENCY_IN</fieldType>
+      <children>
+        <entityParameter>
+          <name>ObjectId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>OnlyInnate_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>RowId_param</name>
+          <expose v="false" />
+        </entityParameter>
+        <entityParameter>
+          <name>ActivityId_param</name>
+          <triggerRecalculation v="true" />
+        </entityParameter>
+      </children>
+    </entityIncomingField>
+    <entityParameter>
+      <name>ActivityId_param</name>
+      <expose v="true" />
+      <mandatory v="false" />
+      <description>PARAMETER</description>
+    </entityParameter>
   </entityFields>
   <recordContainers>
     <dbRecordContainer>
@@ -259,10 +257,10 @@
       <onDBDelete>%aditoprj%/entity/Activity_entity/recordcontainers/db/onDBDelete.js</onDBDelete>
       <linkInformation>
         <linkInformation>
-          <name>a25c4017-1cda-4614-a2f2-d6645e4dafb9</name>
+          <name>4d4e82f5-fd0d-48e0-805a-c713d73dfae0</name>
           <tableName>ACTIVITY</tableName>
           <primaryKey>ACTIVITYID</primaryKey>
-          <isUIDTable v="false" />
+          <isUIDTable v="true" />
           <readonly v="false" />
         </linkInformation>
       </linkInformation>
diff --git a/entity/Activity_entity/entityfields/activitylink_dfo/children/activityid_param/code.js b/entity/Activity_entity/entityfields/activitylink_dfo/children/activityid_param/code.js
deleted file mode 100644
index a8267b62060b4bd30cedaba4713f4421a6e6f9ff..0000000000000000000000000000000000000000
--- a/entity/Activity_entity/entityfields/activitylink_dfo/children/activityid_param/code.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import("system.vars");
-import("system.result");
-
-result.string(vars.get("$field.ACTIVITYID"));
\ No newline at end of file
diff --git a/entity/Activity_entity/entityfields/objectid/valueProcess.js b/entity/Activity_entity/entityfields/objectid/valueProcess.js
deleted file mode 100644
index d158186750f3a3b90b044d2e65a32631987a9df3..0000000000000000000000000000000000000000
--- a/entity/Activity_entity/entityfields/objectid/valueProcess.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import("system.result");
-import("system.vars");
-if (vars.exists("$param.ObjectId_param")) 
-{
-    result.string(vars.get("$param.ObjectId_param"));
-}
-else
-{
-    result.string("");
-}
\ No newline at end of file
diff --git a/entity/Activity_entity/entityfields/rowid/valueProcess.js b/entity/Activity_entity/entityfields/rowid/valueProcess.js
deleted file mode 100644
index ac57c2420cd6b3286deff112021267a5a0dc606f..0000000000000000000000000000000000000000
--- a/entity/Activity_entity/entityfields/rowid/valueProcess.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import("system.result");
-import("system.vars");
-if (vars.exists("$param.ObjectId_param")) 
-{
-    result.string(vars.get("$param.RowId_param"));
-}
-else
-{
-    result.string("");
-}
\ No newline at end of file
diff --git a/entity/Activity_entity/recordcontainers/db/conditionProcess.js b/entity/Activity_entity/recordcontainers/db/conditionProcess.js
index 11f6ef533fc7af22c436ae693fda8e4cab0162c1..53f2381b369a1ded1d73eb0900c6b114d8ef9dee 100644
--- a/entity/Activity_entity/recordcontainers/db/conditionProcess.js
+++ b/entity/Activity_entity/recordcontainers/db/conditionProcess.js
@@ -2,13 +2,23 @@ import("system.vars");
 import("system.db");
 import("system.result");
 import("Sql_lib");
+import("ObjectRelation_lib");
+import("Context_lib");
 
 var cond = new SqlCondition();
-cond.andPrepareVars("ACTIVITYLINK.ROW_ID", "$param.RowId_param", "ACTIVITY.ACTIVITYID in (select ACTIVITYLINK.ACTIVITY_ID from ACTIVITYLINK where # = ?)");
 
-if(vars.exists("$param.OnlyInnate_param") && vars.get("$param.OnlyInnate_param")) {    
-    cond.andPrepare("ACTIVITY.USER_NEW", vars.get("$sys.user"));
-}
+// TODO: evtl anders umsetzen ohne subselect... & in Lib implementieren
+var objectRelationCond = SqlCondition.begin()
+                                     .andPrepare("AB_OBJECTRELATION.OBJECT1_TYPE", ContextUtils.getCurrentContextId())
+                                     .and("AB_OBJECTRELATION.OBJECT1_ROWID = ACTIVITY.ACTIVITYID")
+                                     .andPrepareVars("AB_OBJECTRELATION.OBJECT2_TYPE" , "$param.ObjectId_param")
+                                     .andPrepareVars("AB_OBJECTRELATION.OBJECT2_ROWID" , "$param.RowId_param");
+                                     
+cond.and(db.translateStatement(objectRelationCond.buildSql("exists (select 1 from AB_OBJECTRELATION", "1=2", ")")));
+
+cond.andPrepareVars("ACTIVITY.ACTIVITYID", "$param.ActivityId_param");
+if(vars.exists("$param.OnlyInnate_param") && vars.get("$param.OnlyInnate_param"))    
+    cond.andPrepareVars("ACTIVITY.USER_NEW", "$sys.user");
 
 //TODO: use a preparedCondition when available
 var resCond = db.translateCondition(cond.build("1 = 1"));
diff --git a/entity/Activity_entity/recordcontainers/db/onDBDelete.js b/entity/Activity_entity/recordcontainers/db/onDBDelete.js
index dde70c0c24e05787b39306afd73c5ee15bfd125a..787c4614c1462768ec4b375d47ef1a79eb2d57d3 100644
--- a/entity/Activity_entity/recordcontainers/db/onDBDelete.js
+++ b/entity/Activity_entity/recordcontainers/db/onDBDelete.js
@@ -1,5 +1,11 @@
 import("system.vars");
 import("system.db");
+import("Sql_lib");
+import("Context_lib");
 
-db.deleteData("ACTIVITYLINK", "ACTIVITYLINK.ACTIVITY_ID = '" + vars.getString("$field.ACTIVITYID") + "'");
+var activityObjectsCondition = SqlCondition.begin()
+                                           .andPrepare("AB_OBJECTRELATION.OBJECT1_TYPE", ContextUtils.getCurrentContextId())
+                                           .andPrepareVars("AB_OBJECTRELATION.OBJECT1_ROWID", "$field.ACTIVITYID");
+
+db.deleteData("AB_OBJECTRELATION", activityObjectsCondition.build("1=2"));
 
diff --git a/entity/Activity_entity/recordcontainers/db/onDBInsert.js b/entity/Activity_entity/recordcontainers/db/onDBInsert.js
index e280977c74340186dec49de08eeee183f7b5a315..b2d5b7fa9d842c15cdbe1521308c0162c4542c62 100644
--- a/entity/Activity_entity/recordcontainers/db/onDBInsert.js
+++ b/entity/Activity_entity/recordcontainers/db/onDBInsert.js
@@ -8,8 +8,8 @@ if (vars.exists("$param.RowId_param") && vars.get("$param.RowId_param")
     && vars.exists("$param.ObjectId_param") && vars.get("$param.ObjectId_param"))
 {
     db.insertData(
-        "ACTIVITYLINK",
-        ["ACTIVITYLINKID", "OBJECT_ID", "ROW_ID", "ACTIVITY_ID", "USER_NEW", "DATE_NEW"],
+        "AB_OBJECTRELATION",
+        ["AB_OBJECTRELATIONID", "OBJECT1_TYPE", "OBJECT1_ROWID", "OBJECT2_TYPE", "OBJECT2_ROWID", "USER_NEW", "DATE_NEW"],
         null,
-        [util.getNewUUID(), vars.get("$param.ObjectId_param"), vars.get("$param.RowId_param"), vars.getString("$field.ACTIVITYID"), vars.getString("$sys.user"), vars.getString("$sys.date")]);
+        [util.getNewUUID(), ContextUtils.getCurrentContextId(), vars.get("$field.ACTIVITYID"), vars.get("$param.ObjectId_param"), vars.get("$param.RowId_param"), vars.getString("$sys.user"), vars.getString("$sys.date")]);
 }
\ No newline at end of file
diff --git a/entity/Address_entity/Address_entity.aod b/entity/Address_entity/Address_entity.aod
index 9414f06a232884c8201e9f6c708b8bc0a3729a24..0fbc84dbd62d654ff15bd90fac1294dc11c2c329 100644
--- a/entity/Address_entity/Address_entity.aod
+++ b/entity/Address_entity/Address_entity.aod
@@ -42,6 +42,7 @@
       <title>Country</title>
       <mandatory v="true" />
       <outgoingField>Countries_dfo</outgoingField>
+      <displayValueProcess>%aditoprj%/entity/Address_entity/entityfields/country/displayValueProcess.js</displayValueProcess>
     </entityField>
     <entityField>
       <name>DATE_EDIT</name>
diff --git a/entity/Address_entity/entityfields/country/displayValueProcess.js b/entity/Address_entity/entityfields/country/displayValueProcess.js
new file mode 100644
index 0000000000000000000000000000000000000000..c030b65a02e1a02786c9791741fb73746b54f901
--- /dev/null
+++ b/entity/Address_entity/entityfields/country/displayValueProcess.js
@@ -0,0 +1,11 @@
+import("system.vars");
+import("system.db");
+import("system.translate");
+import("system.result");
+import("Sql_lib");
+
+//TODO: temporary testing code
+var isoCode = vars.get("$field.COUNTRY");
+var countryName  = db.cell(SqlCondition.begin().andPrepare("COUNTRYINFO.ISO2", isoCode).buildSelect("select COUNTRYINFO.NAME_LATIN from COUNTRYINFO"));
+countryName = translate.text(countryName);
+result.string(countryName);
\ No newline at end of file
diff --git a/entity/Comm_entity/entityfields/relationsmaincountry_param/code.js b/entity/Comm_entity/entityfields/relationsmaincountry_param/code.js
index 7a2a8594ddcd6be9d498459b0413a1be88547fbc..caa4f4f5ca420da6bd45bed23347b5b010d2718d 100644
--- a/entity/Comm_entity/entityfields/relationsmaincountry_param/code.js
+++ b/entity/Comm_entity/entityfields/relationsmaincountry_param/code.js
@@ -7,7 +7,7 @@ cond = new SqlCondition();
 
 cond.andPrepareVars("RELATION.RELATIONID", "$param.RelId_param");
 //TODO: this should happen by 1:1 links instead of manually requesting the data by a select
-country = db.cell(cond.buildSelect("select ADDRESS.COUNTRY from ADDRESS "
+country = db.cell(cond.buildSql("select ADDRESS.COUNTRY from ADDRESS "
             + "join RELATION on RELATION.ADDRESS_ID = ADDRESS.ADDRESSID ", "1 = 1"));
 if (country != "") 
     result.string(country);
\ No newline at end of file
diff --git a/entity/Countries_Entity/Countries_Entity.aod b/entity/Countries_Entity/Countries_Entity.aod
index 82ec285893dec22507627ee7456e9a03a7b49075..23db1cb8d4e070be420fe343a45ca1b3fe68272b 100644
--- a/entity/Countries_Entity/Countries_Entity.aod
+++ b/entity/Countries_Entity/Countries_Entity.aod
@@ -22,6 +22,12 @@
           <fieldName>Countries_dfo</fieldName>
           <isOutgoing v="false" />
         </entityDependency>
+        <entityDependency>
+          <name>8e8d1ace-3cbb-4ed7-b029-f486805605ef</name>
+          <entityName>Org_entity</entityName>
+          <fieldName>Countries_dfo</fieldName>
+          <isOutgoing v="false" />
+        </entityDependency>
       </dependencies>
       <children>
         <entityParameter>
diff --git a/entity/ObjectRelation_entity/ObjectRelation_entity.aod b/entity/ObjectRelation_entity/ObjectRelation_entity.aod
index a51e370c886f7245bf211eab6cba7760e8bfd8d2..52aac5e6a29c9683389465b35d54af3201914889 100644
--- a/entity/ObjectRelation_entity/ObjectRelation_entity.aod
+++ b/entity/ObjectRelation_entity/ObjectRelation_entity.aod
@@ -3,15 +3,20 @@
   <name>ObjectRelation_entity</name>
   <majorModelMode>DISTRIBUTED</majorModelMode>
   <documentation>%aditoprj%/entity/ObjectRelation_entity/documentation.adoc</documentation>
+  <recordContainer>db</recordContainer>
   <entityFields>
     <entityIncomingField>
       <name>#INCOMING</name>
+      <recordContainer>db</recordContainer>
     </entityIncomingField>
     <entityField>
       <name>OBJECT1_TYPE</name>
+      <title>Type 1</title>
     </entityField>
     <entityField>
       <name>OBJECT1_ROWID</name>
+      <title>Object 1</title>
+      <linkedContextProcess>%aditoprj%/entity/ObjectRelation_entity/entityfields/object1_rowid/linkedContextProcess.js</linkedContextProcess>
     </entityField>
     <entityField>
       <name>AB_OBJECTRELATIONID</name>
@@ -40,20 +45,37 @@
     </entityField>
     <entityField>
       <name>OBJECT2_ROWID</name>
+      <title>Object 2</title>
     </entityField>
     <entityField>
       <name>OBJECT2_TYPE</name>
+      <title>Type 2</title>
     </entityField>
+    <entityParameter>
+      <name>ObjectRelatonId_param</name>
+      <expose v="true" />
+      <triggerRecalculation v="true" />
+      <mandatory v="true" />
+      <description>PARAMETER</description>
+    </entityParameter>
+    <entityIncomingField>
+      <name>ObjectRelationById_dfi</name>
+      <fieldType>DEPENDENCY_IN</fieldType>
+      <recordContainer>db</recordContainer>
+    </entityIncomingField>
   </entityFields>
   <recordContainers>
     <dbRecordContainer>
       <name>db</name>
+      <title></title>
+      <description>&amp;lt;null value&amp;gt;</description>
       <alias>Data_alias</alias>
+      <conditionProcess>%aditoprj%/entity/ObjectRelation_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
       <linkInformation>
         <linkInformation>
-          <name>a654da8b-bb3f-4a8c-b4c3-4916c04b7a17</name>
-          <tableName>AB_OBJECTREALTION</tableName>
-          <primaryKey>AB_OBJECTREALTIONID</primaryKey>
+          <name>5c101805-5643-466c-b1b8-0462cd90c400</name>
+          <tableName>AB_OBJECTRELATION</tableName>
+          <primaryKey>AB_OBJECTRELATIONID</primaryKey>
           <isUIDTable v="true" />
           <readonly v="false" />
         </linkInformation>
@@ -61,39 +83,35 @@
       <recordFieldMappings>
         <dbRecordFieldMapping>
           <name>AB_OBJECTRELATIONID.value</name>
-          <recordfield>AB_OBJECTREALTION.AB_OBJECTREALTIONID</recordfield>
+          <recordfield>AB_OBJECTRELATION.AB_OBJECTRELATIONID</recordfield>
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>OBJECT1_ROWID.value</name>
-          <recordfield>AB_OBJECTREALTION.OBJECT1_ROWID</recordfield>
+          <recordfield>AB_OBJECTRELATION.OBJECT1_ROWID</recordfield>
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>OBJECT1_TYPE.value</name>
-          <recordfield>AB_OBJECTREALTION.OBJECT1_TYPE</recordfield>
+          <recordfield>AB_OBJECTRELATION.OBJECT1_TYPE</recordfield>
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>OBJECT2_ROWID.value</name>
-          <recordfield>AB_OBJECTREALTION.OBJECT2_ROWID</recordfield>
+          <recordfield>AB_OBJECTRELATION.OBJECT2_ROWID</recordfield>
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>OBJECT2_TYPE.value</name>
-          <recordfield>AB_OBJECTREALTION.OBJECT2_TYPE</recordfield>
+          <recordfield>AB_OBJECTRELATION.OBJECT2_TYPE</recordfield>
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>DATE_EDIT.value</name>
-          <recordfield>AB_OBJECTREALTION.DATE_EDIT</recordfield>
-        </dbRecordFieldMapping>
-        <dbRecordFieldMapping>
-          <name>DATE_NEW.value</name>
-          <recordfield>AB_OBJECTREALTION.DATE_NEW</recordfield>
+          <recordfield>AB_OBJECTRELATION.AB_OBJECTRELATIONID</recordfield>
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>USER_EDIT.value</name>
-          <recordfield>AB_OBJECTREALTION.USER_EDIT</recordfield>
+          <recordfield>AB_OBJECTRELATION.USER_EDIT</recordfield>
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>USER_NEW.value</name>
-          <recordfield>AB_OBJECTREALTION.USER_NEW</recordfield>
+          <recordfield>AB_OBJECTRELATION.USER_NEW</recordfield>
         </dbRecordFieldMapping>
       </recordFieldMappings>
     </dbRecordContainer>
diff --git a/entity/ActivityLink_entity/entityfields/row_id/linkedContextProcess.js b/entity/ObjectRelation_entity/entityfields/object1_rowid/linkedContextProcess.js
similarity index 91%
rename from entity/ActivityLink_entity/entityfields/row_id/linkedContextProcess.js
rename to entity/ObjectRelation_entity/entityfields/object1_rowid/linkedContextProcess.js
index 0053823c5b2e09d97cc0f1338ca57e72b7a77c8d..32aa4d5cf10e5947eece0f6edfc64db38a3591d8 100644
--- a/entity/ActivityLink_entity/entityfields/row_id/linkedContextProcess.js
+++ b/entity/ObjectRelation_entity/entityfields/object1_rowid/linkedContextProcess.js
@@ -2,4 +2,4 @@ import("system.vars");
 import("system.result");
 import("Context_lib");
 
-result.string(ContextUtils.getContextName(vars.get("$field.OBJECT_ID")))
\ No newline at end of file
+result.string(ContextUtils.getContextName(vars.get("$field.OBJECT1_TYPE")));
\ No newline at end of file
diff --git a/entity/ObjectRelation_entity/recordcontainers/db/conditionProcess.js b/entity/ObjectRelation_entity/recordcontainers/db/conditionProcess.js
new file mode 100644
index 0000000000000000000000000000000000000000..fb7e7cc1c02f96bee6639785e888b75126328265
--- /dev/null
+++ b/entity/ObjectRelation_entity/recordcontainers/db/conditionProcess.js
@@ -0,0 +1,14 @@
+import("system.vars");
+import("system.logging");
+import("system.result");
+import("system.db");
+import("Sql_lib");
+
+logging.log("objectid: " + vars.get("$param.ObjectRelatonId_param"))
+logging.log(SqlCondition.begin()
+                .andPrepareVars("AB_OBJECTRELATION.AB_OBJECTRELATIONID", "$param.ObjectRelatonId_param")
+                .build("1=2").toSource())
+
+result.string(db.translateCondition(SqlCondition.begin()
+                .andPrepareVars("AB_OBJECTRELATION.AB_OBJECTRELATIONID", "$param.ObjectRelatonId_param")
+                .build("1=2")));
\ No newline at end of file
diff --git a/entity/Offeritem_entity/entityfields/info/valueProcess.js b/entity/Offeritem_entity/entityfields/info/valueProcess.js
index 28760b4a57c3ea97205a9101034cc877c8f9175f..522166c5f78fbd4dc448006857286c7860a55635 100644
--- a/entity/Offeritem_entity/entityfields/info/valueProcess.js
+++ b/entity/Offeritem_entity/entityfields/info/valueProcess.js
@@ -8,5 +8,5 @@ if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
 {
     // TODO: loading from db until loading from dfo is possible.
     var productId = vars.get("$field.PRODUCT_ID");
-    result.string(db.cell(SqlCondition.begin().andPrepareVars("PRODUCT.PRODUCTID", "$field.PRODUCT_ID").buildSelect("select INFO from PRODUCT", "1=2")));
+    result.string(db.cell(SqlCondition.begin().andPrepareVars("PRODUCT.PRODUCTID", "$field.PRODUCT_ID").buildSql("select INFO from PRODUCT", "1=2")));
 }
\ No newline at end of file
diff --git a/entity/Org_entity/Org_entity.aod b/entity/Org_entity/Org_entity.aod
index aebaf241f2a4b2f78e7af4fcfb3bf83cd29456bc..ae97f276c3cb95adaa22e5cde20a78cb0538cb12 100644
--- a/entity/Org_entity/Org_entity.aod
+++ b/entity/Org_entity/Org_entity.aod
@@ -73,8 +73,10 @@
     <entityField>
       <name>LANGUAGE</name>
       <title>Language</title>
+      <outgoingField>Countries_dfo</outgoingField>
       <possibleItemsProcess>%aditoprj%/entity/Org_entity/entityfields/language/possibleItemsProcess.js</possibleItemsProcess>
       <selectionMode>SINGLE</selectionMode>
+      <displayValueProcess>%aditoprj%/entity/Org_entity/entityfields/language/displayValueProcess.js</displayValueProcess>
     </entityField>
     <entityField>
       <name>ORG_ID</name>
@@ -457,6 +459,13 @@
       <iconId>VAADIN:FILE_TEXT_O</iconId>
     </entityActionField>
     <entityOutgoingField>
+      <name>Countries_dfo</name>
+      <fieldType>DEPENDENCY_OUT</fieldType>
+      <dependency>
+        <name>dependency</name>
+        <entityName>Countries_Entity</entityName>
+        <fieldName>ISO2_NAME</fieldName>
+      </dependency>
       <name>OrgAttr_dfo</name>
       <title>Attributes</title>
       <fieldType>DEPENDENCY_OUT</fieldType>
diff --git a/entity/Org_entity/entityfields/address_id/displayValueProcess.js b/entity/Org_entity/entityfields/address_id/displayValueProcess.js
index 0b423e8828fee5dc2ce5942c26071e188bfe5b5a..ad0d57c105476296ea6fe2d811c487db5abb3d4f 100644
--- a/entity/Org_entity/entityfields/address_id/displayValueProcess.js
+++ b/entity/Org_entity/entityfields/address_id/displayValueProcess.js
@@ -12,7 +12,7 @@ if (addrId)
     var addrData = db.array(db.ROW, 
         SqlCondition.begin()
         .andPrepare("ADDRESS.ADDRESSID", addrId)
-        .buildSelect(select));
+        .buildSql(select));
         
     addr = AddressUtils.formatOneline.apply(this, addrData);
 }
diff --git a/entity/Org_entity/entityfields/language/displayValueProcess.js b/entity/Org_entity/entityfields/language/displayValueProcess.js
new file mode 100644
index 0000000000000000000000000000000000000000..434f279047976fe4508d8618e40717c3bde40fb0
--- /dev/null
+++ b/entity/Org_entity/entityfields/language/displayValueProcess.js
@@ -0,0 +1,11 @@
+import("system.vars");
+import("system.db");
+import("system.translate");
+import("system.result");
+import("Sql_lib");
+
+//TODO: temporary testing code
+var isoCode = vars.get("$field.LANGUAGE");
+var countryName  = db.cell(SqlCondition.begin().andPrepare("COUNTRYINFO.ISO2", isoCode).buildSelect("select COUNTRYINFO.NAME_LATIN from COUNTRYINFO"));
+countryName = translate.text(countryName);
+result.string(countryName);
\ No newline at end of file
diff --git a/entity/Pers_entity/entityfields/address_id/displayValueProcess.js b/entity/Pers_entity/entityfields/address_id/displayValueProcess.js
index 0b423e8828fee5dc2ce5942c26071e188bfe5b5a..ad0d57c105476296ea6fe2d811c487db5abb3d4f 100644
--- a/entity/Pers_entity/entityfields/address_id/displayValueProcess.js
+++ b/entity/Pers_entity/entityfields/address_id/displayValueProcess.js
@@ -12,7 +12,7 @@ if (addrId)
     var addrData = db.array(db.ROW, 
         SqlCondition.begin()
         .andPrepare("ADDRESS.ADDRESSID", addrId)
-        .buildSelect(select));
+        .buildSql(select));
         
     addr = AddressUtils.formatOneline.apply(this, addrData);
 }
diff --git a/entity/Pers_entity/entityfields/persorgsaddresses_dfo/children/relid_param/code.js b/entity/Pers_entity/entityfields/persorgsaddresses_dfo/children/relid_param/code.js
index 30f588988c8d4e0b834fe1409cfff33034c0db5b..f981cc391d7bbd7dc86e4ba02b42d9b652f51b46 100644
--- a/entity/Pers_entity/entityfields/persorgsaddresses_dfo/children/relid_param/code.js
+++ b/entity/Pers_entity/entityfields/persorgsaddresses_dfo/children/relid_param/code.js
@@ -7,6 +7,6 @@ var orgId = vars.get("$field.ORG_ID");
 if (orgId)
 {
     var cond = SqlCondition.begin().and("RELATION.PERS_ID is null").andPrepare("RELATION.ORG_ID", orgId);
-    var orgRelId = db.cell(cond.buildSelect("select RELATION.RELATIONID from RELATION", "1 = 1"));
+    var orgRelId = db.cell(cond.buildSql("select RELATION.RELATIONID from RELATION", "1 = 1"));
     result.string(orgRelId);
 }
\ No newline at end of file
diff --git a/entity/Product_entity/entityfields/relation_id/linkedContextProcess.js b/entity/Product_entity/entityfields/relation_id/linkedContextProcess.js
index d94556cde2fcc04bf1405ee0446a14cdc3550cf2..48528c5c24f559c391ad1f050e610943145da865 100644
--- a/entity/Product_entity/entityfields/relation_id/linkedContextProcess.js
+++ b/entity/Product_entity/entityfields/relation_id/linkedContextProcess.js
@@ -2,4 +2,5 @@ import("system.vars");
 import("system.result");
 import("Relation_lib");
 
-result.string("Org_context");
\ No newline at end of file
+if(vars.get("$field.RELATION_ID"))
+    result.string("Org_context");
\ No newline at end of file
diff --git a/entity/SalesprojectClassificationEntry_entity/contentProcess.js b/entity/SalesprojectClassificationEntry_entity/contentProcess.js
index f6522f780e89253fc134123233f7eff8a203c215..0681d65b8ab35c12e4f4be76676eac10fc976e29 100644
--- a/entity/SalesprojectClassificationEntry_entity/contentProcess.js
+++ b/entity/SalesprojectClassificationEntry_entity/contentProcess.js
@@ -21,7 +21,7 @@ if (vars.exists("$param.ClassId_param") && vars.exists("$param.SalesprojectId_pa
         if (entryKeywords && classId && salesprojectId) {
             // correct db if kewords changed
             allOldTypesCondition = _getClassificationCondition(false);
-            allOldTypes = db.array(db.COLUMN, allOldTypesCondition.buildSelect("select TYPE from SALESPROJECT_CLASSIFICATION", "1 = 0", "group by TYPE"));
+            allOldTypes = db.array(db.COLUMN, allOldTypesCondition.buildSql("select TYPE from SALESPROJECT_CLASSIFICATION", "1 = 0", "group by TYPE"));
 
             if (allOldTypes.length > 0) {
                 // TODO maybe ask user????!!!!!
@@ -30,7 +30,7 @@ if (vars.exists("$param.ClassId_param") && vars.exists("$param.SalesprojectId_pa
 
             // load classifications for the class
             classificationsCondition = _getClassificationCondition(true);
-            classifications = db.table(classificationsCondition.buildSelect("select SALESPROJECT_CLASSIFICATIONID, TYPE, VALUE from SALESPROJECT_CLASSIFICATION", "1 = 0"));        
+            classifications = db.table(classificationsCondition.buildSql("select SALESPROJECT_CLASSIFICATIONID, TYPE, VALUE from SALESPROJECT_CLASSIFICATION", "1 = 0"));        
 
             classifications = entryKeywords.map(function(entryKeyword) {
                 // return saved value
diff --git a/entity/SalesprojectClassificationEntry_entity/recordcontainers/jdito/contentProcess.js b/entity/SalesprojectClassificationEntry_entity/recordcontainers/jdito/contentProcess.js
index f6522f780e89253fc134123233f7eff8a203c215..0681d65b8ab35c12e4f4be76676eac10fc976e29 100644
--- a/entity/SalesprojectClassificationEntry_entity/recordcontainers/jdito/contentProcess.js
+++ b/entity/SalesprojectClassificationEntry_entity/recordcontainers/jdito/contentProcess.js
@@ -21,7 +21,7 @@ if (vars.exists("$param.ClassId_param") && vars.exists("$param.SalesprojectId_pa
         if (entryKeywords && classId && salesprojectId) {
             // correct db if kewords changed
             allOldTypesCondition = _getClassificationCondition(false);
-            allOldTypes = db.array(db.COLUMN, allOldTypesCondition.buildSelect("select TYPE from SALESPROJECT_CLASSIFICATION", "1 = 0", "group by TYPE"));
+            allOldTypes = db.array(db.COLUMN, allOldTypesCondition.buildSql("select TYPE from SALESPROJECT_CLASSIFICATION", "1 = 0", "group by TYPE"));
 
             if (allOldTypes.length > 0) {
                 // TODO maybe ask user????!!!!!
@@ -30,7 +30,7 @@ if (vars.exists("$param.ClassId_param") && vars.exists("$param.SalesprojectId_pa
 
             // load classifications for the class
             classificationsCondition = _getClassificationCondition(true);
-            classifications = db.table(classificationsCondition.buildSelect("select SALESPROJECT_CLASSIFICATIONID, TYPE, VALUE from SALESPROJECT_CLASSIFICATION", "1 = 0"));        
+            classifications = db.table(classificationsCondition.buildSql("select SALESPROJECT_CLASSIFICATIONID, TYPE, VALUE from SALESPROJECT_CLASSIFICATION", "1 = 0"));        
 
             classifications = entryKeywords.map(function(entryKeyword) {
                 // return saved value
diff --git a/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod b/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod
index 3011a9e2bda5c663501fb4b90ea8c33a802f7169..c6e39d5a740c36429caef7138110e2833fdb2aa2 100644
--- a/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod
+++ b/entity/SalesprojectCompetition_entity/SalesprojectCompetition_entity.aod
@@ -142,18 +142,18 @@
       <conditionProcess>%aditoprj%/entity/SalesprojectCompetition_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
       <linkInformation>
         <linkInformation>
-          <name>40929203-c34a-4320-b83d-57a60c851a89</name>
+          <name>d34f0a49-d8c1-4024-84ef-fdd1a7acd326</name>
           <tableName>SALESPROJECT_COMPETITION</tableName>
           <primaryKey>SALESPROJECT_COMPETITIONID</primaryKey>
           <isUIDTable v="true" />
           <readonly v="false" />
         </linkInformation>
         <linkInformation>
-          <name>efb1f8fb-8451-4cc9-a25f-b896d5e1ae53</name>
+          <name>c1f6867a-e913-4f3f-a0b8-ea0a44f71d3c</name>
           <tableName>ORG</tableName>
           <primaryKey>ORGID</primaryKey>
           <isUIDTable v="false" />
-          <readonly v="false" />
+          <readonly v="true" />
         </linkInformation>
       </linkInformation>
       <recordFieldMappings>
diff --git a/entity/SalesprojectForecast_entity/SalesprojectForecast_entity.aod b/entity/SalesprojectForecast_entity/SalesprojectForecast_entity.aod
index 099ec6b1fe05ab56f2479a87c592d7f16067cf21..04eca20d0ae9324898f65501684a433f1ffd792b 100644
--- a/entity/SalesprojectForecast_entity/SalesprojectForecast_entity.aod
+++ b/entity/SalesprojectForecast_entity/SalesprojectForecast_entity.aod
@@ -33,6 +33,7 @@
     </entityField>
     <entityField>
       <name>RELATION_ID</name>
+      <mandatory v="true" />
     </entityField>
     <entityField>
       <name>SALESPROJECT_FORECASTID</name>
diff --git a/entity/SalesprojectMember_entity/SalesprojectMember_entity.aod b/entity/SalesprojectMember_entity/SalesprojectMember_entity.aod
index 73938370be41f70551e7798c299fdc48cfaf3750..c93b59eb9895ea879c0c6b5e6c8d862f87c37061 100644
--- a/entity/SalesprojectMember_entity/SalesprojectMember_entity.aod
+++ b/entity/SalesprojectMember_entity/SalesprojectMember_entity.aod
@@ -125,9 +125,11 @@
     <entityField>
       <name>RELATIONSHIP</name>
       <title>Relationship</title>
-      <description>Overrules RELATION_RELATIONSHIP</description>
+      <description>Overrules RELATION_RELATIONSHIP
+
+TODO: intuitive möglichkeit, auf dend Stand aus Relation zurückzusetzen... aktuell im edit mode auf leeres Feld, dann wird das aus relation angezeigt</description>
       <contentType>NUMBER</contentType>
-      <onValueChange>%aditoprj%/entity/SalesprojectMember_entity/entityfields/relationship/onValueChange.js</onValueChange>
+      <displayValueProcess>%aditoprj%/entity/SalesprojectMember_entity/entityfields/relationship/displayValueProcess.js</displayValueProcess>
       <onValueChangeTypes>
         <element>MASK</element>
         <element>PROCESS</element>
@@ -139,15 +141,6 @@
       <description>TODO: Beziehung zu der Relation 1024846 (z.B. per Ampelsystem)</description>
       <contentType>NUMBER</contentType>
     </entityField>
-    <entityFieldGroup>
-      <name>resultingRelation_fieldGroup</name>
-      <valueProcess>%aditoprj%/entity/SalesprojectMember_entity/entityfields/resultingrelation_fieldgroup/valueProcess.js</valueProcess>
-      <title>Relationship</title>
-      <description>FIELDGROUP</description>
-      <fields>
-        <element>RELATIONSHIP</element>
-      </fields>
-    </entityFieldGroup>
     <entityOutgoingField>
       <name>PersLookup_dfo</name>
       <fieldType>DEPENDENCY_OUT</fieldType>
diff --git a/entity/SalesprojectMember_entity/entityfields/resultingrelation_fieldgroup/valueProcess.js b/entity/SalesprojectMember_entity/entityfields/relationship/displayValueProcess.js
similarity index 52%
rename from entity/SalesprojectMember_entity/entityfields/resultingrelation_fieldgroup/valueProcess.js
rename to entity/SalesprojectMember_entity/entityfields/relationship/displayValueProcess.js
index 9fbba891587b6972c4dfdba2f3badfaf76752d59..15f3d68ca45227a8ecfaf2ed3ec301ad18c4c83e 100644
--- a/entity/SalesprojectMember_entity/entityfields/resultingrelation_fieldgroup/valueProcess.js
+++ b/entity/SalesprojectMember_entity/entityfields/relationship/displayValueProcess.js
@@ -1,12 +1,14 @@
+import("system.logging");
 import("system.result");
 import("system.vars");
 
 var localRelationship = vars.get("$field.RELATIONSHIP");
+
 if (localRelationship)
 {
-    result.string("loc" + alRelationship);
+    result.string(localRelationship);
 }
 else
 {
-    result.string("rem" + vars.get("$field.RELATION_RELATIONSHIP"));
+    result.string(vars.get("$field.RELATION_RELATIONSHIP"));
 }
diff --git a/entity/SalesprojectMember_entity/entityfields/relationship/onValueChange.js b/entity/SalesprojectMember_entity/entityfields/relationship/onValueChange.js
deleted file mode 100644
index cc3f4f7c331d448abe1663adbfff4247c20ad71c..0000000000000000000000000000000000000000
--- a/entity/SalesprojectMember_entity/entityfields/relationship/onValueChange.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import("system.vars");
-import("system.logging");
-
-logging.log(vars.get("$field.RELATIONSHIP"))
\ No newline at end of file
diff --git a/entity/Salesproject_entity/Salesproject_entity.aod b/entity/Salesproject_entity/Salesproject_entity.aod
index 3e43eb36fbc8e9e77a53e502ef552b8b230ac41c..15e361722c0ab9045b78a7fc8fb4fe99c87e2bbd 100644
--- a/entity/Salesproject_entity/Salesproject_entity.aod
+++ b/entity/Salesproject_entity/Salesproject_entity.aod
@@ -115,6 +115,8 @@
     <entityField>
       <name>VOLUME</name>
       <title>Volume</title>
+      <description>The displayValue from the recoord container adds T € (translated)</description>
+      <contentTypeProcess>%aditoprj%/entity/Salesproject_entity/entityfields/volume/contentTypeProcess.js</contentTypeProcess>
     </entityField>
     <entityOutgoingField>
       <name>SalesprojectOrg_dfo</name>
@@ -130,15 +132,6 @@
       <title>Probability</title>
       <possibleItemsProcess>%aditoprj%/entity/Salesproject_entity/entityfields/probability/possibleItemsProcess.js</possibleItemsProcess>
     </entityField>
-    <entityFieldGroup>
-      <name>VOLUME_DISPLAY_fieldGroup</name>
-      <valueProcess>%aditoprj%/entity/Salesproject_entity/entityfields/volume_display_fieldgroup/valueProcess.js</valueProcess>
-      <title>Volume</title>
-      <description>FIELDGROUP</description>
-      <fields>
-        <element>VOLUME</element>
-      </fields>
-    </entityFieldGroup>
     <entityOutgoingField>
       <name>SalesprojectSource_dfo</name>
       <title>Source</title>
@@ -411,6 +404,10 @@
           <name>RELATION_ID.displayValue</name>
           <recordfield>ORG.NAME</recordfield>
         </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>VOLUME.displayValue</name>
+          <expression>%aditoprj%/entity/Salesproject_entity/recordcontainers/db/recordfieldmappings/volume.displayvalue/expression.js</expression>
+        </dbRecordFieldMapping>
       </recordFieldMappings>
     </dbRecordContainer>
   </recordContainers>
diff --git a/entity/Salesproject_entity/entityfields/volume/contentTypeProcess.js b/entity/Salesproject_entity/entityfields/volume/contentTypeProcess.js
new file mode 100644
index 0000000000000000000000000000000000000000..ce76b0444f1f77a3b3c25eab41c4940feb10702f
--- /dev/null
+++ b/entity/Salesproject_entity/entityfields/volume/contentTypeProcess.js
@@ -0,0 +1,13 @@
+import("system.result");
+import("system.vars");
+import("system.neon");
+
+var recordState = vars.get("$sys.recordstate");
+if (recordState == neon.OPERATINGSTATE_EDIT || recordState == neon.OPERATINGSTATE_NEW)
+{
+    result.string("NUMBER");
+}
+else
+{
+    result.string("TEXT");
+}
\ No newline at end of file
diff --git a/entity/Salesproject_entity/entityfields/volume_display_fieldgroup/valueProcess.js b/entity/Salesproject_entity/entityfields/volume_display_fieldgroup/valueProcess.js
deleted file mode 100644
index eee86d7eef08aa2a0a16e7665d539f12a193c9ec..0000000000000000000000000000000000000000
--- a/entity/Salesproject_entity/entityfields/volume_display_fieldgroup/valueProcess.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import("system.result");
-import("system.vars");
-import("system.translate");
-
-result.string(vars.get("$field.VOLUME") + " " + translate.text("${THOUSAND_SHORT}") + " " + translate.text("${EURO_SIGN}"));
\ No newline at end of file
diff --git a/entity/Salesproject_entity/recordcontainers/db/recordfieldmappings/volume.displayvalue/expression.js b/entity/Salesproject_entity/recordcontainers/db/recordfieldmappings/volume.displayvalue/expression.js
new file mode 100644
index 0000000000000000000000000000000000000000..542d45f41cf7db2349f5a6908b87813c5565f725
--- /dev/null
+++ b/entity/Salesproject_entity/recordcontainers/db/recordfieldmappings/volume.displayvalue/expression.js
@@ -0,0 +1,6 @@
+import("system.translate");
+import("system.result");
+import("Sql_lib");
+
+var maskingUtils = new SqlMaskingUtils();
+result.string(maskingUtils.concat(["char(SALESPROJECT.VOLUME)", "'" + translate.text("${THOUSAND_SHORT}") + "'", "'" + translate.text("${EURO_SIGN}") + "'"], " ", true))
\ No newline at end of file
diff --git a/entity/Task_entity/onValidation.js b/entity/Task_entity/onValidation.js
index adec45e2126cefedb731170f258d89d77162deb9..9d163bb6d1dd266ac8be3fa38724bf65c8a58199 100644
--- a/entity/Task_entity/onValidation.js
+++ b/entity/Task_entity/onValidation.js
@@ -4,13 +4,12 @@ import("system.text");
 import("system.neon");
 import("Sql_lib");
 
-//TODO: crashes server
-//if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
-//{
-//    var maskingHelper = new SqlMaskingUtils();
-//    var newCodeNumber = db.cell("select " + maskingHelper.max("TASK.CODE") + " from TASK");
-//    newCodeNumber = Number(newCodeNumber);//if no number exists till no, start value will be 1 (due to: ++0)
-//    if (isNaN(newCodeNumber))
-//        throw new TypeError();//TODO:add Message
-//    neon.setFieldValue("$field.CODE", text.formatLong(++newCodeNumber, "0000000"));
-//}
\ No newline at end of file
+if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
+{
+    var maskingHelper = new SqlMaskingUtils();
+    var newCodeNumber = db.cell("select " + maskingHelper.max("TASK.CODE") + " from TASK");
+    newCodeNumber = Number(newCodeNumber);//if no number exists till no, start value will be 1 (due to: ++0)
+    if (isNaN(newCodeNumber))
+        throw new TypeError();//TODO:add Message
+    neon.setFieldValue("$field.CODE", ++newCodeNumber);
+}
\ No newline at end of file
diff --git a/entity/Timetracking_entity/Timetracking_entity.aod b/entity/Timetracking_entity/Timetracking_entity.aod
index b639046223247e035bde57c42ba99b2a204d79d0..9551bfbbd322c9d87ed6a9ca7ad0a74590c9662e 100644
--- a/entity/Timetracking_entity/Timetracking_entity.aod
+++ b/entity/Timetracking_entity/Timetracking_entity.aod
@@ -166,7 +166,7 @@
         </dbRecordFieldMapping>
         <dbRecordFieldMapping>
           <name>RELATION_ID.displayValue</name>
-          <recordfield>PERS.LASTNAME</recordfield>
+          <expression>%aditoprj%/entity/Timetracking_entity/recordcontainers/db/recordfieldmappings/relation_id.displayvalue/expression.js</expression>
         </dbRecordFieldMapping>
       </recordFieldMappings>
     </dbRecordContainer>
diff --git a/entity/Timetracking_entity/recordcontainers/db/recordfieldmappings/relation_id.displayvalue/expression.js b/entity/Timetracking_entity/recordcontainers/db/recordfieldmappings/relation_id.displayvalue/expression.js
new file mode 100644
index 0000000000000000000000000000000000000000..00b5fa7447a54ccd53c3125e6f9b8081f0157e90
--- /dev/null
+++ b/entity/Timetracking_entity/recordcontainers/db/recordfieldmappings/relation_id.displayvalue/expression.js
@@ -0,0 +1,4 @@
+import("system.result");
+import("Pers_lib");
+
+result.string(PersUtils.getResolvingDisplaySubSql("RELATION_ID"))
\ No newline at end of file
diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
index 1d1edeea216fc05ee7996b7c522c53b0b9a6ce49..304422d8f287882831d2253eb7a8d255c33a65b8 100644
--- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
+++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod
@@ -1142,7 +1142,7 @@
     </entry>
     <entry>
       <key>Forecast</key>
-      <value>Vorhersage</value>
+      <value>Forecast</value>
     </entry>
     <entry>
       <key>Member</key>
@@ -1413,7 +1413,7 @@
     </entry>
     <entry>
       <key>Relationship</key>
-      <value></value>
+      <value>Beziehung</value>
     </entry>
     <entry>
       <key>${BINARY_LIB_TOO_MANY_BINARIES}</key>
diff --git a/neonContext/ActivityLink_context/ActivityLink_context.aod b/neonContext/ObjectRelation_context/ObjectRelation_context.aod
similarity index 63%
rename from neonContext/ActivityLink_context/ActivityLink_context.aod
rename to neonContext/ObjectRelation_context/ObjectRelation_context.aod
index 3606a9f2defbf3b2d53a3617413089d5bd63b659..90149360d0cc36dcfafaabe2735efa1e9b2045b7 100644
--- a/neonContext/ActivityLink_context/ActivityLink_context.aod
+++ b/neonContext/ObjectRelation_context/ObjectRelation_context.aod
@@ -1,13 +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.0.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.0.0">
-  <name>ActivityLink_context</name>
+  <name>ObjectRelation_context</name>
   <majorModelMode>DISTRIBUTED</majorModelMode>
-  <filterview>ActivityLinkFilter_view</filterview>
-  <entity>ActivityLink_entity</entity>
+  <entity>ObjectRelation_entity</entity>
   <references>
     <neonViewReference>
-      <name>9fe94a17-0d0f-4d43-b233-7fde1c408b34</name>
-      <view>ActivityLinkFilter_view</view>
+      <name>f6b27aa2-d0a7-479c-812e-8b16400b564b</name>
+      <view>ObjectRelationFilter_view</view>
     </neonViewReference>
   </references>
 </neonContext>
diff --git a/neonView/ActivityLinkFilter_view/ActivityLinkFilter_view.aod b/neonView/ActivityLinkFilter_view/ActivityLinkFilter_view.aod
deleted file mode 100644
index b36092508ad19f4b7d2b74200f307b7cde921d36..0000000000000000000000000000000000000000
--- a/neonView/ActivityLinkFilter_view/ActivityLinkFilter_view.aod
+++ /dev/null
@@ -1,27 +0,0 @@
-<?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.0.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.1">
-  <name>ActivityLinkFilter_view</name>
-  <title>Connections</title>
-  <majorModelMode>DISTRIBUTED</majorModelMode>
-  <layout>
-    <boxLayout>
-      <name>layout</name>
-    </boxLayout>
-  </layout>
-  <children>
-    <tableViewTemplate>
-      <name>ActivityLinkFilter_template</name>
-      <entityField>#ENTITY</entityField>
-      <columns>
-        <neonTableColumn>
-          <name>a529b696-f7e2-4890-8455-a5754035c830</name>
-          <entityField>OBJECT_ID</entityField>
-        </neonTableColumn>
-        <neonTableColumn>
-          <name>048fde66-f67e-423d-90ba-400b7f79fcef</name>
-          <entityField>ROW_ID</entityField>
-        </neonTableColumn>
-      </columns>
-    </tableViewTemplate>
-  </children>
-</neonView>
diff --git a/neonView/ObjectRelationFilter_view/ObjectRelationFilter_view.aod b/neonView/ObjectRelationFilter_view/ObjectRelationFilter_view.aod
new file mode 100644
index 0000000000000000000000000000000000000000..3f48889779996f9719b1a3b404b3d70a0c47da36
--- /dev/null
+++ b/neonView/ObjectRelationFilter_view/ObjectRelationFilter_view.aod
@@ -0,0 +1,44 @@
+<?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.0.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.0.1">
+  <name>ObjectRelationFilter_view</name>
+  <majorModelMode>DISTRIBUTED</majorModelMode>
+  <layout>
+    <boxLayout>
+      <name>layout</name>
+    </boxLayout>
+  </layout>
+  <children>
+    <tableViewTemplate>
+      <name>ObjectRelations</name>
+      <autoNewRow v="true" />
+      <entityField>#ENTITY</entityField>
+      <title>Object Relation</title>
+      <columns>
+        <neonTableColumn>
+          <name>4fb01378-e6c6-4fb5-8b3b-8a90b3550105</name>
+          <entityField>OBJECT1_ROWID</entityField>
+          <width v="75" />
+          <expandRatio v="100" />
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>c5eb8814-31f0-437d-aea8-c72301b00deb</name>
+          <entityField>OBJECT1_TYPE</entityField>
+          <width v="75" />
+          <expandRatio v="100" />
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>4495cf75-82d1-4ad3-9a48-86ad44eadc37</name>
+          <entityField>OBJECT2_ROWID</entityField>
+          <width v="75" />
+          <expandRatio v="100" />
+        </neonTableColumn>
+        <neonTableColumn>
+          <name>99e92d98-81b4-4e68-927e-a77771b31ed7</name>
+          <entityField>OBJECT2_TYPE</entityField>
+          <width v="75" />
+          <expandRatio v="100" />
+        </neonTableColumn>
+      </columns>
+    </tableViewTemplate>
+  </children>
+</neonView>
diff --git a/neonView/SalesprojectForecastEdit_view/SalesprojectForecastEdit_view.aod b/neonView/SalesprojectForecastEdit_view/SalesprojectForecastEdit_view.aod
index 556692b6a5300da2aa0bb102b623bb1acbf46827..c215032af8808619deffd893329f70c618e99547 100644
--- a/neonView/SalesprojectForecastEdit_view/SalesprojectForecastEdit_view.aod
+++ b/neonView/SalesprojectForecastEdit_view/SalesprojectForecastEdit_view.aod
@@ -14,8 +14,8 @@
       <entityField>#ENTITY</entityField>
       <fields>
         <entityFieldLink>
-          <name>1100a2dd-b79d-4bcb-99d3-246a0db4346a</name>
-          <entityField>TYPE</entityField>
+          <name>8c7e16f6-222d-4f8a-9cc6-74de1a0ee481</name>
+          <entityField>GROUPCODE</entityField>
         </entityFieldLink>
         <entityFieldLink>
           <name>fefae7ed-072c-4c48-92fd-d3fa6ccd0711</name>
@@ -29,6 +29,10 @@
           <name>f5e95dd2-c853-48be-ad18-e5fdbe714873</name>
           <entityField>INFO</entityField>
         </entityFieldLink>
+        <entityFieldLink>
+          <name>382caf7e-d3db-4bac-af99-a95d62504da7</name>
+          <entityField>RELATION_ID</entityField>
+        </entityFieldLink>
       </fields>
     </genericViewTemplate>
   </children>
diff --git a/neonView/SalesprojectMemberPreview_view/SalesprojectMemberPreview_view.aod b/neonView/SalesprojectMemberPreview_view/SalesprojectMemberPreview_view.aod
index 446720d67ac9402c34bd4ce59d26763688b84907..f89b89ba2b942d623634d6a7e082996077d0b32a 100644
--- a/neonView/SalesprojectMemberPreview_view/SalesprojectMemberPreview_view.aod
+++ b/neonView/SalesprojectMemberPreview_view/SalesprojectMemberPreview_view.aod
@@ -21,8 +21,8 @@
       <entityField>#ENTITY</entityField>
       <fields>
         <entityFieldLink>
-          <name>c5957f1f-253f-4941-b7db-8b6b438f2ad7</name>
-          <entityField>resultingRelation_fieldGroup</entityField>
+          <name>9eafb9df-5b00-4e1f-aacf-04c62cfaddf0</name>
+          <entityField>RELATIONSHIP</entityField>
         </entityFieldLink>
       </fields>
     </genericViewTemplate>
diff --git a/neonView/SalesprojectPreview_view/SalesprojectPreview_view.aod b/neonView/SalesprojectPreview_view/SalesprojectPreview_view.aod
index 22341863c9bb9aca35324959ff83f5d7f74ea86c..dfa8042e8af3a5ac06c7ee43b87aee9fb7a62b10 100644
--- a/neonView/SalesprojectPreview_view/SalesprojectPreview_view.aod
+++ b/neonView/SalesprojectPreview_view/SalesprojectPreview_view.aod
@@ -45,8 +45,8 @@
           <entityField>PROBABILITY</entityField>
         </entityFieldLink>
         <entityFieldLink>
-          <name>fbd92799-b2e9-40e9-8700-f95765befa55</name>
-          <entityField>VOLUME_DISPLAY_fieldGroup</entityField>
+          <name>950d21a3-c0f9-4df5-9810-fa027a6fdb4a</name>
+          <entityField>VOLUME</entityField>
         </entityFieldLink>
         <entityFieldLink>
           <name>774ab565-a5e0-4b31-a77a-39143534f9a8</name>
diff --git a/neonView/TimetrackingEdit_view/TimetrackingEdit_view.aod b/neonView/TimetrackingEdit_view/TimetrackingEdit_view.aod
index e2d08cfd27067d9b2754b0a74a6bdaaa7511b2f2..9303e0141e1078032f7b971fc44c1273ea80615c 100644
--- a/neonView/TimetrackingEdit_view/TimetrackingEdit_view.aod
+++ b/neonView/TimetrackingEdit_view/TimetrackingEdit_view.aod
@@ -29,14 +29,6 @@
           <name>57370b00-130c-439e-9b70-fd56fc28c892</name>
           <entityField>INFO</entityField>
         </entityFieldLink>
-        <entityFieldLink>
-          <name>d44c516d-779d-46da-b095-b98c31443f90</name>
-          <entityField>OBJECT_ID</entityField>
-        </entityFieldLink>
-        <entityFieldLink>
-          <name>41cdec17-ed61-490d-8afa-a0fc3cd41d57</name>
-          <entityField>ROW_ID</entityField>
-        </entityFieldLink>
       </fields>
     </genericViewTemplate>
   </children>
diff --git a/neonView/TimetrackingPreview_view/TimetrackingPreview_view.aod b/neonView/TimetrackingPreview_view/TimetrackingPreview_view.aod
index 94b47069c6c7f6c1993f7d38b7de9a5a8c688dfc..9212d737ac3063e630f393eaa184272856d9399d 100644
--- a/neonView/TimetrackingPreview_view/TimetrackingPreview_view.aod
+++ b/neonView/TimetrackingPreview_view/TimetrackingPreview_view.aod
@@ -30,10 +30,6 @@
           <name>54123bdf-3008-4597-9f30-fc2877a274f7</name>
           <entityField>INFO</entityField>
         </entityFieldLink>
-        <entityFieldLink>
-          <name>30ffb0d7-26ba-49cc-bde7-855b2716c63f</name>
-          <entityField>ROW_ID</entityField>
-        </entityFieldLink>
       </fields>
     </genericViewTemplate>
   </children>
diff --git a/others/db_changes/data_alias/data/example_activity/LOBs/subjectText_1050d93f.txt b/others/db_changes/data_alias/data/example_activity/LOBs/subjectText_1050d93f.txt
deleted file mode 100644
index 2959d68f962f707c785f6efbe2805d0c0f085e21..0000000000000000000000000000000000000000
--- a/others/db_changes/data_alias/data/example_activity/LOBs/subjectText_1050d93f.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-<html>
-	<body>
-		<h1>Headertest</h1>
-		<p>Paragraphtest</p>
-	</body>
-</html>
\ No newline at end of file
diff --git a/others/db_changes/data_alias/data/example_activity/LOBs/subjectText_661a7b87.txt b/others/db_changes/data_alias/data/example_activity/LOBs/subjectText_661a7b87.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ed03740997fc4fc1e20bc306f533fa1150446237
--- /dev/null
+++ b/others/db_changes/data_alias/data/example_activity/LOBs/subjectText_661a7b87.txt
@@ -0,0 +1,10 @@
+<html>
+	<body>
+		<h1>Headertest</h1>
+		<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. 
+
+Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. 
+
+Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p>
+	</body>
+</html>
\ No newline at end of file
diff --git a/others/db_changes/data_alias/data/example_activity/LOBs/subjectText_de410a35.txt b/others/db_changes/data_alias/data/example_activity/LOBs/subjectText_661a7b87_1.txt
similarity index 98%
rename from others/db_changes/data_alias/data/example_activity/LOBs/subjectText_de410a35.txt
rename to others/db_changes/data_alias/data/example_activity/LOBs/subjectText_661a7b87_1.txt
index 2f2b1ad688247223281d626599e696f5273d4d17..96486e079fe0f2d2e0be1219c9015dd8ff93c76a 100644
--- a/others/db_changes/data_alias/data/example_activity/LOBs/subjectText_de410a35.txt
+++ b/others/db_changes/data_alias/data/example_activity/LOBs/subjectText_661a7b87_1.txt
@@ -2,4 +2,4 @@ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
 
 Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. 
 
-Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. 
\ No newline at end of file
+Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p>
diff --git a/others/db_changes/data_alias/data/example_activity/example_activity.xml b/others/db_changes/data_alias/data/example_activity/example_activity.xml
deleted file mode 100644
index 9144846b72bbfc583f4c9656cadcf4a9ba65ca59..0000000000000000000000000000000000000000
--- a/others/db_changes/data_alias/data/example_activity/example_activity.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.1" encoding="UTF-8" standalone="no"?>
-<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
-    <changeSet author="j.goderbauer" id="075bdfd7-3c6c-41e0-8267-ceac3e41c555">
-        <insert tableName="ACTIVITY">
-            <column name="ACTIVITYID" value="de410a35-bcab-407e-9d60-7a65f028159b"/>
-            <column name="USER_NEW" value="Gwendoline"/>
-            <column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
-            <column name="SUBJECT" value="call from Haråld"/>
-            <column name="INFO" valueClobFile="/data/example_activity/LOBs/subjectText_de410a35.txt"/>
-            <column name="CATEGORY" valueNumeric="2"/>
-            <column name="DIRECTION" value="i"/>
-            <column name="ENTRYDATE" valueDate="2018-08-03T12:41:22"/>
-        </insert>
-        <insert tableName="ACTIVITYLINK">
-            <column name="ACTIVITYLINKID" value="b435a1da-39f2-48ae-93a5-bad704e5ae48"/>
-            <column name="ACTIVITY_ID" value="de410a35-bcab-407e-9d60-7a65f028159b"/>
-            <column name="ROW_ID" value="a589b58a-f120-42d8-9a64-0b176501eac7"/>
-            <column name="USER_NEW" value="Gwendoline"/>
-            <column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
-            <column name="OBJECT_ID" value="Org_context"/>
-        </insert>
-        <rollback>
-            <delete tableName="ACTIVITYLINK">
-                <where>ACTIVITYLINKID = ?</where>
-                <whereParams>
-                    <param value="b435a1da-39f2-48ae-93a5-bad704e5ae48" />
-                </whereParams>
-            </delete>
-            <delete tableName="ACTIVITY">
-                <where>ACTIVITYID = ?</where>
-                <whereParams>
-                    <param value="de410a35-bcab-407e-9d60-7a65f028159b" />
-                </whereParams>
-            </delete>
-        </rollback>
-    </changeSet>
-</databaseChangeLog>
\ No newline at end of file
diff --git a/others/db_changes/data_alias/data/example_activity/example_activity_gfk.xml b/others/db_changes/data_alias/data/example_activity/example_activity_gfk.xml
index 5fcb5adf4cf8ada177db65438dbb19582731dfb0..5e8d87cc869b37565ac13a59f94a1e899a57e210 100644
--- a/others/db_changes/data_alias/data/example_activity/example_activity_gfk.xml
+++ b/others/db_changes/data_alias/data/example_activity/example_activity_gfk.xml
@@ -4,18 +4,28 @@
         <insert tableName="ACTIVITY">
             <column name="ACTIVITYID" value="661a7b87-68ae-4d52-bc22-6bf96184e6fe"/>
             <column name="SUBJECT" value="Webinar: Transparentes Kampagnen- und Veranstaltungsmanagement"/>
-            <column name="INFO" value="Hat teilgenommen und Feedback gegeben: begeistert von den neuen Möglichkeiten und der Webinar-Qualität"/>
+            <column name="INFO" valueClobFile="LOBs/subjectText_661a7b87.txt"/>
             <column name="CATEGORY" valueNumeric="1"/>
             <column name="DIRECTION" value="o"/>
             <column name="USER_NEW" value="Admin"/>
             <column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
             <column name="ENTRYDATE" valueDate="2018-08-03T12:02:52"/>
         </insert>
-        <insert tableName="ACTIVITYLINK">
-            <column name="ACTIVITYLINKID" value="5a4d249a-e3e4-48e5-80a5-2fd1567a82b8"/>
-            <column name="ACTIVITY_ID" value="661a7b87-68ae-4d52-bc22-6bf96184e6fe"/>
-            <column name="OBJECT_ID" value="Org_context"/>
-            <column name="ROW_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="5a4d249a-e3e4-48e5-80a5-2fd1567a82b8"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="661a7b87-68ae-4d52-bc22-6bf96184e6fe"/>
+            <column name="OBJECT2_TYPE" value="Org_context"/>
+            <column name="OBJECT2_ROWID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+            <column name="USER_NEW" value="Admin"/>
+            <column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
+        </insert>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="83337967-5d58-4b17-88c2-2aeefa130c21"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="661a7b87-68ae-4d52-bc22-6bf96184e6fe"/>
+            <column name="OBJECT2_TYPE" value="Pers_context"/>
+            <column name="OBJECT2_ROWID" value="6be18a7e-e7fa-11e8-9f32-f2801f1b9fd1"/>
             <column name="USER_NEW" value="Admin"/>
             <column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
         </insert>
@@ -29,11 +39,12 @@
             <column name="DATE_NEW" valueDate="2018-07-31T12:02:52"/>
             <column name="ENTRYDATE" valueDate="2018-07-31T12:02:52"/>
         </insert>
-        <insert tableName="ACTIVITYLINK">
-            <column name="ACTIVITYLINKID" value="b0fae79b-0b1e-4650-8d94-853d17cca7bd"/>
-            <column name="ACTIVITY_ID" value="9dda39bf-966c-4560-be03-5ddbbc1da84a"/>
-            <column name="OBJECT_ID" value="Org_context"/>
-            <column name="ROW_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="b0fae79b-0b1e-4650-8d94-853d17cca7bd"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="9dda39bf-966c-4560-be03-5ddbbc1da84a"/>
+            <column name="OBJECT2_TYPE" value="Org_context"/>
+            <column name="OBJECT2_ROWID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
             <column name="USER_NEW" value="Admin"/>
             <column name="DATE_NEW" valueDate="2018-07-31T12:02:52"/>
         </insert>
@@ -47,11 +58,12 @@
             <column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
             <column name="ENTRYDATE" valueDate="2018-08-03T12:02:52"/>
         </insert>
-        <insert tableName="ACTIVITYLINK">
-            <column name="ACTIVITYLINKID" value="01ff4193-d5b4-41eb-b2db-ea31e5ed7df4"/>
-            <column name="ACTIVITY_ID" value="94365b81-cddd-4f56-8379-7ba0a98840a4"/>
-            <column name="OBJECT_ID" value="Org_context"/>
-            <column name="ROW_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="01ff4193-d5b4-41eb-b2db-ea31e5ed7df4"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="94365b81-cddd-4f56-8379-7ba0a98840a4"/>
+            <column name="OBJECT2_TYPE" value="Org_context"/>
+            <column name="OBJECT2_ROWID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
             <column name="USER_NEW" value="Admin"/>
             <column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
         </insert>
@@ -65,11 +77,12 @@
             <column name="DATE_NEW" valueDate="2018-08-06T12:02:52"/>
             <column name="ENTRYDATE" valueDate="2018-08-06T12:02:52"/>
         </insert>
-        <insert tableName="ACTIVITYLINK">
-            <column name="ACTIVITYLINKID" value="80d3de8f-fd86-401b-aeae-63b389b9310c"/>
-            <column name="ACTIVITY_ID" value="6397161c-afed-40cf-a1bd-12e657054ce4"/>
-            <column name="OBJECT_ID" value="Org_context"/>
-            <column name="ROW_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="80d3de8f-fd86-401b-aeae-63b389b9310c"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="6397161c-afed-40cf-a1bd-12e657054ce4"/>
+            <column name="OBJECT2_TYPE" value="Org_context"/>
+            <column name="OBJECT2_ROWID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
             <column name="USER_NEW" value="Admin"/>
             <column name="DATE_NEW" valueDate="2018-08-06T12:02:52"/>
         </insert>
@@ -83,11 +96,12 @@
             <column name="DATE_NEW" valueDate="2018-08-04T12:02:52"/>
             <column name="ENTRYDATE" valueDate="2018-08-04T12:02:52"/>
         </insert>
-        <insert tableName="ACTIVITYLINK">
-            <column name="ACTIVITYLINKID" value="5ad45b3e-72a0-419e-a183-17aaead38158"/>
-            <column name="ACTIVITY_ID" value="b378876d-dba5-4e41-865f-9ac056bffa60"/>
-            <column name="OBJECT_ID" value="Org_context"/>
-            <column name="ROW_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="5ad45b3e-72a0-419e-a183-17aaead38158"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="b378876d-dba5-4e41-865f-9ac056bffa60"/>
+            <column name="OBJECT2_TYPE" value="Org_context"/>
+            <column name="OBJECT2_ROWID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
             <column name="USER_NEW" value="Admin"/>
             <column name="DATE_NEW" valueDate="2018-08-04T12:02:52"/>
         </insert>
@@ -101,11 +115,12 @@
             <column name="DATE_NEW" valueDate="2018-08-09T12:02:52"/>
             <column name="ENTRYDATE" valueDate="2018-08-09T12:02:52"/>
         </insert>
-        <insert tableName="ACTIVITYLINK">
-            <column name="ACTIVITYLINKID" value="6c212e64-a9db-4395-a118-5279dbc6761d"/>
-            <column name="ACTIVITY_ID" value="beda92e0-bbd6-423a-8b49-78da30064e84"/>
-            <column name="OBJECT_ID" value="Org_context"/>
-            <column name="ROW_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="6c212e64-a9db-4395-a118-5279dbc6761d"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="beda92e0-bbd6-423a-8b49-78da30064e84"/>
+            <column name="OBJECT2_TYPE" value="Org_context"/>
+            <column name="OBJECT2_ROWID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
             <column name="USER_NEW" value="Admin"/>
             <column name="DATE_NEW" valueDate="2018-08-09T12:02:52"/>
         </insert>
@@ -119,11 +134,12 @@
             <column name="DATE_NEW" valueDate="2018-08-04T12:02:52"/>
             <column name="ENTRYDATE" valueDate="2018-08-04T12:02:52"/>
         </insert>
-        <insert tableName="ACTIVITYLINK">
-            <column name="ACTIVITYLINKID" value="8d384436-9989-4571-a193-cc3061249f97"/>
-            <column name="ACTIVITY_ID" value="56c78f3d-e126-4e36-8031-d5eef9877243"/>
-            <column name="OBJECT_ID" value="Org_context"/>
-            <column name="ROW_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="8d384436-9989-4571-a193-cc3061249f97"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="56c78f3d-e126-4e36-8031-d5eef9877243"/>
+            <column name="OBJECT2_TYPE" value="Org_context"/>
+            <column name="OBJECT2_ROWID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
             <column name="USER_NEW" value="Admin"/>
             <column name="DATE_NEW" valueDate="2018-08-04T12:02:52"/>
         </insert>
@@ -137,11 +153,12 @@
             <column name="DATE_NEW" valueDate="2018-08-12T12:02:52"/>
             <column name="ENTRYDATE" valueDate="2018-08-12T12:02:52"/>
         </insert>
-        <insert tableName="ACTIVITYLINK">
-            <column name="ACTIVITYLINKID" value="20a50d5d-fe87-4ed2-8f94-b2571b6b34e7"/>
-            <column name="ACTIVITY_ID" value="9f498736-c523-4c63-8c53-28e49324b52b"/>
-            <column name="OBJECT_ID" value="Org_context"/>
-            <column name="ROW_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="20a50d5d-fe87-4ed2-8f94-b2571b6b34e7"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="9f498736-c523-4c63-8c53-28e49324b52b"/>
+            <column name="OBJECT2_TYPE" value="Org_context"/>
+            <column name="OBJECT2_ROWID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
             <column name="USER_NEW" value="Admin"/>
             <column name="DATE_NEW" valueDate="2018-08-12T12:02:52"/>
         </insert>
@@ -155,11 +172,12 @@
             <column name="DATE_NEW" valueDate="2018-08-11T12:02:52"/>
             <column name="ENTRYDATE" valueDate="2018-08-11T12:02:52"/>
         </insert>
-        <insert tableName="ACTIVITYLINK">
-            <column name="ACTIVITYLINKID" value="46d9d317-1b7d-4046-8278-9a4957cc1dfe"/>
-            <column name="ACTIVITY_ID" value="1c711078-8324-4fcf-93ec-2c8aa29c0cc6"/>
-            <column name="OBJECT_ID" value="Org_context"/>
-            <column name="ROW_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="46d9d317-1b7d-4046-8278-9a4957cc1dfe"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="1c711078-8324-4fcf-93ec-2c8aa29c0cc6"/>
+            <column name="OBJECT2_TYPE" value="Org_context"/>
+            <column name="OBJECT2_ROWID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
             <column name="USER_NEW" value="Admin"/>
             <column name="DATE_NEW" valueDate="2018-08-11T12:02:52"/>
         </insert>
diff --git a/others/db_changes/data_alias/data/example_activity/extendHLink_62330df6.xml b/others/db_changes/data_alias/data/example_activity/extendHLink_62330df6.xml
deleted file mode 100644
index 78cfa9a7b7f31c9eaa50520e31bfa9df896e5745..0000000000000000000000000000000000000000
--- a/others/db_changes/data_alias/data/example_activity/extendHLink_62330df6.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.1" encoding="UTF-8" standalone="no"?>
-<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">    <changeSet author="j.goderbauer" id="62330df6-3edd-469d-893e-bd936677e8ff">
-        <insert tableName="ACTIVITY">
-            <column name="ACTIVITYID" value="1050d93f-535a-4d01-a835-3ff0272c6af0"/>
-            <column name="USER_NEW" value="Gwendoline"/>
-            <column name="DATE_NEW" valueDate="2018-08-03T12:12:52"/>
-            <column name="SUBJECT" value="interesting information from the customer visit"/>
-            <column name="INFO" valueClobFile="/data/example_activity/LOBs/subjectText_1050d93f.txt"/>
-            <column name="CATEGORY" valueNumeric="2"/>
-            <column name="DIRECTION" value="o"/>
-            <column name="ENTRYDATE" valueDate="2018-08-03T14:41:22"/>
-        </insert>
-        <insert tableName="ACTIVITYLINK">
-            <column name="ACTIVITYLINKID" value="850139a8-93b9-452c-8e02-e32b7c00e265"/>
-            <column name="ACTIVITY_ID" value="1050d93f-535a-4d01-a835-3ff0272c6af0"/>
-            <column name="ROW_ID" value="a8e084e2-d68a-4f1e-a7bb-f8d46ad6293d"/>
-            <column name="USER_NEW" value="Lisa Sommer"/>
-            <column name="DATE_NEW" valueDate="2018-08-03T12:12:52"/>
-            <column name="OBJECT_ID" value="3"/>
-        </insert>
-        <rollback>
-            <delete tableName="ACTIVITYLINK">
-                <where>ACTIVITYLINKID = ?</where>
-                <whereParams>
-                    <param value="850139a8-93b9-452c-8e02-e32b7c00e265" />
-                </whereParams>
-            </delete>
-            <delete tableName="ACTIVITY">
-                <where>ACTIVITYID = ?</where>
-                <whereParams>
-                    <param value="1050d93f-535a-4d01-a835-3ff0272c6af0" />
-                </whereParams>
-            </delete>
-        </rollback>
-    </changeSet>
-</databaseChangeLog>
\ No newline at end of file
diff --git a/others/db_changes/data_alias/data/example_org/ORG_gfk.xml b/others/db_changes/data_alias/data/example_org/ORG_gfk.xml
index daa007f99938fa84137194331aaa7f170705a869..b3c8c49ca9218a155e7161293fec640eb03484b6 100644
--- a/others/db_changes/data_alias/data/example_org/ORG_gfk.xml
+++ b/others/db_changes/data_alias/data/example_org/ORG_gfk.xml
@@ -1,201 +1,165 @@
 <?xml version="1.1" encoding="UTF-8" standalone="no"?>
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
-<changeSet author="t.feldmann" id="efc66d2-a20d-49e0-a24c-afab6095d1cb">
-	<insert tableName="ORG">
-			<column name="ORGID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="DATE_NEW" valueDate="2018-06-13T09:03:43"/>
-			<column name="NAME" value="Gfk AG"/>
-			<column name="CUSTOMERCODE" value="00000001"/>
-			<column name="TYPE" valueNumeric="0"/>
-                        <column name="PRICE_POLITICS" valueNumeric="1"/>    
-                        <column name="STRENGTH" valueNumeric="1"/>    
-                        <column name="WEAKNESS" valueNumeric="1"/>  
-	</insert>
-	<insert tableName="RELATION">
-			<column name="RELATIONID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="DATE_NEW" valueDate="2018-06-13T09:03:43"/>
-			<column name="ORG_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
-			<column name="LANGUAGE" value="de-DE"/>
-			<column name="STATUS" valueNumeric="1"/>
-                        <column name="ADDRESS_ID" value="14d03432-985b-4efe-a634-da71ae482907"/>
-	</insert>
-	<insert tableName="COMM">
-			<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="COMMID" value="14a01219-985b-4efe-a634-da71ae482907"/>
-			<column name="RELATION_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
-			<column name="MEDIUM_ID" valueNumeric="1"/>
-			<column name="ADDR" value="gfk@domain.local"/>
-			<column name="STANDARD" valueNumeric="1"/>
-	</insert>
-	<insert tableName="COMM">
-			<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="COMMID" value="22d07819-985b-4efe-a634-da71ae482907"/>
-			<column name="RELATION_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
-			<column name="MEDIUM_ID" valueNumeric="2"/>
-			<column name="ADDR" value="098713332"/>
-			<column name="STANDARD" valueNumeric="0"/>
-	</insert>
-	<insert tableName="COMM">
-			<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="COMMID" value="00d07819-985b-4efe-a634-da71ae482907"/>
-			<column name="RELATION_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
-			<column name="MEDIUM_ID" valueNumeric="3"/>
-			<column name="ADDR" value="www.gfk.de"/>
-			<column name="STANDARD" valueNumeric="0"/>
-	</insert>
-	<insert tableName="ADDRESS">
-			<column name="STATE" value="Bayern"/>
-			<column name="ADDR_TYPE" valueNumeric="1"/>
-			<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-			<column name="CITY" value="München"/>
-			<column name="COUNTRY" value="DE"/>
-			<column name="RELATION_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="ADDRIDENTIFIER" value="Tor 1"/>
-			<column name="REGION" value=""/>
-			<column name="ADDRESSID" value="14d03432-985b-4efe-a634-da71ae482907"/>
-			<column name="BUILDINGNO" value="2"/>
-			<column name="ADDRESSADDITION"/>
-			<column name="ZIP" value="80807"/>
-			<column name="ADDRESS" value="Wilhelm-Straße"/>
-			<column name="DISTRICT" value="Oberbayern"/>
-	</insert>
-	<insert tableName="ACTIVITY">
-			<column name="ACTIVITYID" value="de410a35-bcab-407e-9d60-7a65f028159b"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
-			<column name="SUBJECT" value="Produktpalette"/>
-			<column name="INFO" value="seit November neuer Einkäufer bei Schulz. Herr Traum wird unsere Spezifikation aber in jedem Fall auch 1997 festschreiben. Dennoch Vorsicht: Besuch"/>
-			<column name="CATEGORY" valueNumeric="2"/>
-			<column name="DIRECTION" value="i"/>
-			<column name="ENTRYDATE" valueDate="2018-08-03T12:41:22"/>
-	</insert>
-	<insert tableName="ACTIVITYLINK">
-			<column name="ACTIVITYLINKID" value="b435a1da-39f2-48ae-93a5-bad704e5ae48"/>
-			<column name="ACTIVITY_ID" value="de410a35-bcab-407e-9d60-7a65f028159b"/>
-			<column name="ROW_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
-			<column name="OBJECT_ID" value="Org_context"/>
-	</insert>
+    <changeSet author="t.feldmann" id="efc66d2-a20d-49e0-a24c-afab6095d1cb">
+        <insert tableName="ORG">
+            <column name="ORGID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="DATE_NEW" valueDate="2018-06-13T09:03:43"/>
+            <column name="NAME" value="Gfk AG"/>
+            <column name="CUSTOMERCODE" value="00000001"/>
+            <column name="TYPE" valueNumeric="0"/>
+            <column name="PRICE_POLITICS" valueNumeric="1"/>    
+            <column name="STRENGTH" valueNumeric="1"/>    
+            <column name="WEAKNESS" valueNumeric="1"/>  
+        </insert>
+        <insert tableName="RELATION">
+            <column name="RELATIONID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="DATE_NEW" valueDate="2018-06-13T09:03:43"/>
+            <column name="ORG_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+            <column name="LANGUAGE" value="de-DE"/>
+            <column name="STATUS" valueNumeric="1"/>
+            <column name="ADDRESS_ID" value="14d03432-985b-4efe-a634-da71ae482907"/>
+        </insert>
+        <insert tableName="COMM">
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="COMMID" value="14a01219-985b-4efe-a634-da71ae482907"/>
+            <column name="RELATION_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+            <column name="MEDIUM_ID" valueNumeric="1"/>
+            <column name="ADDR" value="gfk@domain.local"/>
+            <column name="STANDARD" valueNumeric="1"/>
+        </insert>
+        <insert tableName="COMM">
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="COMMID" value="22d07819-985b-4efe-a634-da71ae482907"/>
+            <column name="RELATION_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+            <column name="MEDIUM_ID" valueNumeric="2"/>
+            <column name="ADDR" value="098713332"/>
+            <column name="STANDARD" valueNumeric="0"/>
+        </insert>
+        <insert tableName="COMM">
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="COMMID" value="00d07819-985b-4efe-a634-da71ae482907"/>
+            <column name="RELATION_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+            <column name="MEDIUM_ID" valueNumeric="3"/>
+            <column name="ADDR" value="www.gfk.de"/>
+            <column name="STANDARD" valueNumeric="0"/>
+        </insert>
+        <insert tableName="ADDRESS">
+            <column name="STATE" value="Bayern"/>
+            <column name="ADDR_TYPE" valueNumeric="1"/>
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="CITY" value="München"/>
+            <column name="COUNTRY" value="DE"/>
+            <column name="RELATION_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="ADDRIDENTIFIER" value="Tor 1"/>
+            <column name="REGION" value=""/>
+            <column name="ADDRESSID" value="14d03432-985b-4efe-a634-da71ae482907"/>
+            <column name="BUILDINGNO" value="2"/>
+            <column name="ADDRESSADDITION"/>
+            <column name="ZIP" value="80807"/>
+            <column name="ADDRESS" value="Wilhelm-Straße"/>
+            <column name="DISTRICT" value="Oberbayern"/>
+        </insert>
+        <insert tableName="ACTIVITY">
+            <column name="ACTIVITYID" value="de110a33-bcab-407e-9d60-7a65f028159b"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
+            <column name="SUBJECT" value="Nachfassen"/>
+            <column name="INFO" value="Informationen sind zu seiner Zufriedenheit gewesen, sendet eine Email mit einer konkreten Anfrage."/>
+            <column name="CATEGORY" valueNumeric="3"/>
+            <column name="DIRECTION" value="o"/>
+            <column name="ENTRYDATE" valueDate="2017-04-13T12:41:22"/>
+        </insert>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="baa5a1da-39f2-48ae-93a5-bad704e5ae48"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="de110a33-bcab-407e-9d60-7a65f028159b"/>
+            <column name="OBJECT2_TYPE" value="Org_context"/>
+            <column name="OBJECT2_ROWID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="DATE_NEW" valueDate="2018-08-03T17:33:52"/>
+        </insert>
+        <insert tableName="ACTIVITY">
+            <column name="ACTIVITYID" value="de110a35-aaab-407e-9d60-7a65f028159b"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
+            <column name="SUBJECT" value="Kauf der Maschine von KUKA, Augsburg"/>
+            <column name="INFO" value="erworben von Roboterabteilung"/>
+            <column name="CATEGORY" valueNumeric="1"/>
+            <column name="DIRECTION" value="i"/>
+            <column name="ENTRYDATE" valueDate="2018-02-22T14:41:22"/>
+        </insert>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="caa5a1da-39f2-48ae-93a5-bad704e5ae48"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="de110a35-aaab-407e-9d60-7a65f028159b"/>
+            <column name="OBJECT2_TYPE" value="Org_context"/>
+            <column name="OBJECT2_ROWID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
+        </insert>
 
-	<insert tableName="ACTIVITY">
-			<column name="ACTIVITYID" value="de110a33-bcab-407e-9d60-7a65f028159b"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
-			<column name="SUBJECT" value="Nachfassen"/>
-			<column name="INFO" value="Informationen sind zu seiner Zufriedenheit gewesen, sendet eine Email mit einer konkreten Anfrage."/>
-			<column name="CATEGORY" valueNumeric="3"/>
-			<column name="DIRECTION" value="o"/>
-			<column name="ENTRYDATE" valueDate="2017-04-13T12:41:22"/>
-	</insert>
-	<insert tableName="ACTIVITYLINK">
-			<column name="ACTIVITYLINKID" value="baa5a1da-39f2-48ae-93a5-bad704e5ae48"/>
-			<column name="ACTIVITY_ID" value="de110a33-bcab-407e-9d60-7a65f028159b"/>
-			<column name="ROW_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="DATE_NEW" valueDate="2018-08-03T17:33:52"/>
-			<column name="OBJECT_ID" value="Org_context"/>
-	</insert>
-
-
-	<insert tableName="ACTIVITY">
-			<column name="ACTIVITYID" value="de110a35-aaab-407e-9d60-7a65f028159b"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
-			<column name="SUBJECT" value="Kauf der Maschine von KUKA, Augsburg"/>
-			<column name="INFO" value="erworben von Roboterabteilung"/>
-			<column name="CATEGORY" valueNumeric="1"/>
-			<column name="DIRECTION" value="i"/>
-			<column name="ENTRYDATE" valueDate="2018-02-22T14:41:22"/>
-	</insert>
-	<insert tableName="ACTIVITYLINK">
-			<column name="ACTIVITYLINKID" value="caa5a1da-39f2-48ae-93a5-bad704e5ae48"/>
-			<column name="ACTIVITY_ID" value="de110a35-aaab-407e-9d60-7a65f028159b"/>
-			<column name="ROW_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
-			<column name="OBJECT_ID" value="Org_context"/>
-	</insert>
-
-	<rollback>
-		<delete tableName="ACTIVITYLINK">
-				<where>ACTIVITYLINKID = ?</where>
-				<whereParams>
-						<param value="caa5a1da-39f2-48ae-93a5-bad704e5ae48" />
-				</whereParams>
-		</delete>
-		<delete tableName="ACTIVITY">
-				<where>ACTIVITYID = ?</where>
-				<whereParams>
-						<param value="de110a35-aaab-407e-9d60-7a65f028159b" />
-				</whereParams>
-		</delete>
-		<delete tableName="ACTIVITYLINK">
-				<where>ACTIVITYLINKID = ?</where>
-				<whereParams>
-						<param value="baa5a1da-39f2-48ae-93a5-bad704e5ae48" />
-				</whereParams>
-		</delete>
-		<delete tableName="ACTIVITY">
-				<where>ACTIVITYID = ?</where>
-				<whereParams>
-						<param value="de110a33-bcab-407e-9d60-7a65f028159b" />
-				</whereParams>
-		</delete>
-		<delete tableName="ACTIVITYLINK">
-				<where>ACTIVITYLINKID = ?</where>
-				<whereParams>
-						<param value="b435a1da-39f2-48ae-93a5-bad704e5ae48" />
-				</whereParams>
-		</delete>
-		<delete tableName="ACTIVITY">
-				<where>ACTIVITYID = ?</where>
-				<whereParams>
-						<param value="de410a35-bcab-407e-9d60-7a65f028159b" />
-				</whereParams>
-		</delete>
-		<delete tableName="ADDRESS">
-				<where>ADDRESSID = ?</where>
-				<whereParams>
-						<param value="14d03432-985b-4efe-a634-da71ae482907" />
-				</whereParams>
-		</delete>
-		<delete tableName="COMM">
-				<where>COMMID = ?</where>
-				<whereParams>
-						<param value="00d07819-985b-4efe-a634-da71ae482907" />
-				</whereParams>
-		</delete>
-		<delete tableName="COMM">
-				<where>COMMID = ?</where>
-				<whereParams>
-						<param value="22d07819-985b-4efe-a634-da71ae482907" />
-				</whereParams>
-		</delete>
-			<delete tableName="COMM">
-					<where>COMMID = ?</where>
-					<whereParams>
-							<param value="14a01219-985b-4efe-a634-da71ae482907" />
-					</whereParams>
-			</delete>
-			<delete tableName="RELATION">
-					<where>RELATIONID = ?</where>
-					<whereParams>
-							<param value="b219b58a-f120-42d8-9a64-0b176501eac7" />
-					</whereParams>
-			</delete>
-			<delete tableName="ORG">
-					<where>ORGID = ?</where>
-					<whereParams>
-							<param value="b219b58a-f120-42d8-9a64-0b176501eac7" />
-					</whereParams>
-			</delete>
-	</rollback>
-</changeSet>
+        <rollback>
+            <delete tableName="AB_OBJECTRELATION">
+                <where>OBJECT1_TYPE = ? and OBJECT1_ROWID = ?</where>
+                <whereParams>
+                    <param value="Activity_context" />
+                    <param value="de110a35-aaab-407e-9d60-7a65f028159b" />
+                </whereParams>
+            </delete>
+            <delete tableName="ACTIVITY">
+                <where>ACTIVITYID = ?</where>
+                <whereParams>
+                    <param value="de110a35-aaab-407e-9d60-7a65f028159b" />
+                </whereParams>
+            </delete>
+            <delete tableName="ACTIVITY">
+                <where>ACTIVITYID = ?</where>
+                <whereParams>
+                    <param value="de110a33-bcab-407e-9d60-7a65f028159b" />
+                </whereParams>
+            </delete>
+            <delete tableName="ADDRESS">
+                <where>ADDRESSID = ?</where>
+                <whereParams>
+                    <param value="14d03432-985b-4efe-a634-da71ae482907" />
+                </whereParams>
+            </delete>
+            <delete tableName="COMM">
+                <where>COMMID = ?</where>
+                <whereParams>
+                    <param value="00d07819-985b-4efe-a634-da71ae482907" />
+                </whereParams>
+            </delete>
+            <delete tableName="COMM">
+                <where>COMMID = ?</where>
+                <whereParams>
+                    <param value="22d07819-985b-4efe-a634-da71ae482907" />
+                </whereParams>
+            </delete>
+            <delete tableName="COMM">
+                <where>COMMID = ?</where>
+                <whereParams>
+                    <param value="14a01219-985b-4efe-a634-da71ae482907" />
+                </whereParams>
+            </delete>
+            <delete tableName="RELATION">
+                <where>RELATIONID = ?</where>
+                <whereParams>
+                    <param value="b219b58a-f120-42d8-9a64-0b176501eac7" />
+                </whereParams>
+            </delete>
+            <delete tableName="ORG">
+                <where>ORGID = ?</where>
+                <whereParams>
+                    <param value="b219b58a-f120-42d8-9a64-0b176501eac7" />
+                </whereParams>
+            </delete>
+        </rollback>
+    </changeSet>
 </databaseChangeLog>
diff --git a/others/db_changes/data_alias/data/example_pers/PERS_leicht.xml b/others/db_changes/data_alias/data/example_pers/PERS_leicht.xml
index eaf9517e31f485c7c0da0a93da029b131a014e97..12f128c912171f2eb0c05069657af007e1708a09 100644
--- a/others/db_changes/data_alias/data/example_pers/PERS_leicht.xml
+++ b/others/db_changes/data_alias/data/example_pers/PERS_leicht.xml
@@ -2,7 +2,7 @@
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
 <changeSet author="m.escher" id="efc45d2-a40d-49e0-a24c-afab6095d1cb">
     <insert tableName="PERS">
-        <column name="PERSID" value="73d72bf8-e7f5-11e8-9f32-f2801f1b9fd1"/>
+        <column name="PERSID" value="73d72f18-e7f5-11e8-9f32-f2801f1b9fd1"/>
         <column name="FIRSTNAME" value="Birgit"/>
         <column name="MIDDLENAME"/>
         <column name="LASTNAME" value="Leicht"/>
@@ -15,7 +15,7 @@
     <insert tableName="RELATION">
         <column name="RELATIONSHIP" valueNumeric="1"/>
         <column name="LANGUAGE" value="de-DE"/>
-        <column name="PERS_ID" value="73d72bf8-e7f5-11e8-9f32-f2801f1b9fd1"/>
+        <column name="PERS_ID" value="73d72f18-e7f5-11e8-9f32-f2801f1b9fd1"/>
         <column name="RELATIONID" value="73d72f18-e7f5-11e8-9f32-f2801f1b9fd1"/>
         <column name="ORG_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
         <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
@@ -66,13 +66,13 @@
         <delete tableName="PERS">
             <where>PERSID = ?</where>
             <whereParams>
-                <param value="73d72bf8-e7f5-11e8-9f32-f2801f1b9fd1" />
+                <param value="73d72f18-e7f5-11e8-9f32-f2801f1b9fd1" />
             </whereParams>
         </delete>
         <delete tableName="ADDRESS">
             <where>RELATION_ID = ?</where>
             <whereParams>
-                <param value="73d72bf8-e7f5-11e8-9f32-f2801f1b9fd1" />
+                <param value="73d72f18-e7f5-11e8-9f32-f2801f1b9fd1" />
             </whereParams>
         </delete>
     </rollback>
diff --git a/others/db_changes/data_alias/data/example_pers/PERS_muller.xml b/others/db_changes/data_alias/data/example_pers/PERS_muller.xml
index 43eb63ace53485c777194b5e1fb9bde238732f94..6c6098dd93d3530da7c1f6e1d16a494b3c84980a 100644
--- a/others/db_changes/data_alias/data/example_pers/PERS_muller.xml
+++ b/others/db_changes/data_alias/data/example_pers/PERS_muller.xml
@@ -2,7 +2,7 @@
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
 <changeSet author="m.escher" id="efc45d2-a40d-49e0-a24c-afab6095d1cb">
 	<insert tableName="PERS">
-		<column name="PERSID" value="73d72202-e7f5-11e8-9f32-f2801f1b9fd1"/>
+		<column name="PERSID" value="73d72702-e7f5-11e8-9f32-f2801f1b9fd1"/>
         <column name="FIRSTNAME" value="Franz"/>
         <column name="MIDDLENAME"/>
         <column name="LASTNAME" value="Müller"/>
@@ -16,7 +16,7 @@
                 <column name="RELATIONSHIP" valueNumeric="1"/>
                 <column name="LANGUAGE" value="de-DE"/>
 		<column name="RELATIONID" value="73d72702-e7f5-11e8-9f32-f2801f1b9fd1"/>
-		<column name="PERS_ID" value="73d72202-e7f5-11e8-9f32-f2801f1b9fd1"/>
+		<column name="PERS_ID" value="73d72702-e7f5-11e8-9f32-f2801f1b9fd1"/>
 		<column name="ORG_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
 		<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
 		<column name="USER_NEW" value="admin"/>
@@ -32,7 +32,7 @@
 		<delete tableName="PERS">
 			<where>PERSID = ?</where>
 			<whereParams>
-				<param value="73d72202-e7f5-11e8-9f32-f2801f1b9fd1" />
+				<param value="73d72702-e7f5-11e8-9f32-f2801f1b9fd1" />
 			</whereParams>
 		</delete>
 	</rollback>
diff --git a/others/db_changes/data_alias/data/example_pers/PERS_pfiffig.xml b/others/db_changes/data_alias/data/example_pers/PERS_pfiffig.xml
index 6103a84c51059ab1af44e6e4aa7dc3f75e7ab815..adb03c303767903a199ed4f8882c9b9389b992d2 100644
--- a/others/db_changes/data_alias/data/example_pers/PERS_pfiffig.xml
+++ b/others/db_changes/data_alias/data/example_pers/PERS_pfiffig.xml
@@ -1,125 +1,127 @@
 <?xml version="1.1" encoding="UTF-8" standalone="no"?>
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
-<changeSet author="t.feldmann" id="efc45d2-a40d-49e0-a24c-afab6095d1cb">
-	<insert tableName="PERS">
-		<column name="PERSID" value="efc45d11-a40d-59e0-a24c-afcb6095d2cb"/>
-		<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-		<column name="DATEOFBIRTH" valueDate="1991-02-01"/>
-		<column name="USER_NEW" value="admin"/>
-		<column name="FIRSTNAME" value="Peter"/>
-		<column name="MIDDLENAME" value=""/>
-		<column name="LASTNAME" value="Pfiffig"/>
-		<column name="GENDER" value="m"/>
-		<column name="SALUTATION" value="Herr"/>
-	</insert>
-	<insert tableName="RELATION">
-                <column name="RELATIONSHIP" valueNumeric="1"/>
-                <column name="LANGUAGE" value="de-DE"/>
-		<column name="RELATIONID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
-		<column name="PERS_ID" value="efc45d11-a40d-59e0-a24c-afcb6095d2cb"/>
-		<column name="ORG_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
-		<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-		<column name="USER_NEW" value="admin"/>
-		<column name="STATUS" valueNumeric="1"/>
-	</insert>
-	<insert tableName="COMM">
-			<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="COMMID" value="14d01219-985b-4efe-a634-da71ae482907"/>
-			<column name="RELATION_ID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
-			<column name="MEDIUM_ID" valueNumeric="1"/>
-			<column name="ADDR" value="pfiffig@web.de"/>
-			<column name="STANDARD" valueNumeric="1"/>
-	</insert>
-	<insert tableName="COMM">
-			<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="COMMID" value="22d01219-985b-4efe-a634-da71ae482907"/>
-			<column name="RELATION_ID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
-			<column name="MEDIUM_ID" valueNumeric="2"/>
-			<column name="ADDR" value="08871333"/>
-			<column name="STANDARD" valueNumeric="0"/>
-	</insert>
-	<insert tableName="ADDRESS">
-			<column name="STATE" value="Bayern"/>
-			<column name="ADDR_TYPE" valueNumeric="2"/>
-			<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-			<column name="CITY" value="Nürnberg"/>
-			<column name="COUNTRY" value="DE"/>
-			<column name="RELATION_ID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="ADDRIDENTIFIER" value="Tor 1"/>
-			<column name="REGION" value="Mittelfranken"/>
-			<column name="ADDRESSID" value="14d01332-985b-4efe-a634-da71ae482907"/>
-			<column name="BUILDINGNO" value="25"/>
-			<column name="ADDRESSADDITION"/>
-			<column name="ZIP" value="90419"/>
-			<column name="ADDRESS" value="Laufertorgraben"/>
-			<column name="DISTRICT" value="Nürnberg"/>
-	</insert>
-	<insert tableName="ACTIVITY">
-			<column name="ACTIVITYID" value="de110a35-bcab-407e-9d60-7a65f028159b"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
-			<column name="SUBJECT" value="Muster"/>
-			<column name="INFO" value="Spezifikation ausgefüllt und abgeschickt"/>
-			<column name="CATEGORY" valueNumeric="1"/>
-			<column name="DIRECTION" value="o"/>
-			<column name="ENTRYDATE" valueDate="2018-06-03T12:41:22"/>
-	</insert>
-	<insert tableName="ACTIVITYLINK">
-			<column name="ACTIVITYLINKID" value="b111a1da-39f2-48ae-93a5-bad704e5ae48"/>
-			<column name="ACTIVITY_ID" value="de110a35-bcab-407e-9d60-7a65f028159b"/>
-			<column name="ROW_ID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="DATE_NEW" valueDate="2018-06-03T14:02:52"/>
-			<column name="OBJECT_ID" value="Pers_context"/>
-	</insert>
-	<rollback>
-		<delete tableName="ACTIVITYLINK">
-				<where>ACTIVITYLINKID = ?</where>
-				<whereParams>
-						<param value="b111a1da-39f2-48ae-93a5-bad704e5ae48" />
-				</whereParams>
-		</delete>
-		<delete tableName="ACTIVITY">
-				<where>ACTIVITYID = ?</where>
-				<whereParams>
-						<param value="de110a35-bcab-407e-9d60-7a65f028159b" />
-				</whereParams>
-		</delete>
-		<delete tableName="ADDRESS">
-			<where>ADDRESSID = ?</where>
-			<whereParams>
-				<param value="14d01332-985b-4efe-a634-da71ae482907" />
-			</whereParams>
-		</delete>
-		<delete tableName="COMM">
-			<where>COMMID = ?</where>
-			<whereParams>
-				<param value="22d01219-985b-4efe-a634-da71ae482907" />
-			</whereParams>
-		</delete>
-		<delete tableName="COMM">
-			<where>COMMID = ?</where>
-			<whereParams>
-				<param value="14d01219-985b-4efe-a634-da71ae482907" />
-			</whereParams>
-		</delete>
-		<delete tableName="RELATION">
-			<where>RELATIONID = ?</where>
-			<whereParams>
-				<param value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d" />
-			</whereParams>
-		</delete>
-		<delete tableName="PERS">
-			<where>PERSID = ?</where>
-			<whereParams>
-				<param value="efc45d11-a40d-59e0-a24c-afcb6095d2cb" />
-			</whereParams>
-		</delete>
-	</rollback>
-</changeSet>
+    <changeSet author="t.feldmann" id="efc45d2-a40d-49e0-a24c-afab6095d1cb">
+        <insert tableName="PERS">
+            <column name="PERSID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="DATEOFBIRTH" valueDate="1991-02-01"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="FIRSTNAME" value="Peter"/>
+            <column name="MIDDLENAME" value=""/>
+            <column name="LASTNAME" value="Pfiffig"/>
+            <column name="GENDER" value="m"/>
+            <column name="SALUTATION" value="Herr"/>
+        </insert>
+        <insert tableName="RELATION">
+            <column name="RELATIONSHIP" valueNumeric="1"/>
+            <column name="LANGUAGE" value="de-DE"/>
+            <column name="RELATIONID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
+            <column name="PERS_ID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
+            <column name="ORG_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="STATUS" valueNumeric="1"/>
+        </insert>
+        <insert tableName="COMM">
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="COMMID" value="14d01219-985b-4efe-a634-da71ae482907"/>
+            <column name="RELATION_ID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
+            <column name="MEDIUM_ID" valueNumeric="1"/>
+            <column name="ADDR" value="pfiffig@web.de"/>
+            <column name="STANDARD" valueNumeric="1"/>
+        </insert>
+        <insert tableName="COMM">
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="COMMID" value="22d01219-985b-4efe-a634-da71ae482907"/>
+            <column name="RELATION_ID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
+            <column name="MEDIUM_ID" valueNumeric="2"/>
+            <column name="ADDR" value="08871333"/>
+            <column name="STANDARD" valueNumeric="0"/>
+        </insert>
+        <insert tableName="ADDRESS">
+            <column name="STATE" value="Bayern"/>
+            <column name="ADDR_TYPE" valueNumeric="2"/>
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="CITY" value="Nürnberg"/>
+            <column name="COUNTRY" value="DE"/>
+            <column name="RELATION_ID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="ADDRIDENTIFIER" value="Tor 1"/>
+            <column name="REGION" value="Mittelfranken"/>
+            <column name="ADDRESSID" value="14d01332-985b-4efe-a634-da71ae482907"/>
+            <column name="BUILDINGNO" value="25"/>
+            <column name="ADDRESSADDITION"/>
+            <column name="ZIP" value="90419"/>
+            <column name="ADDRESS" value="Laufertorgraben"/>
+            <column name="DISTRICT" value="Nürnberg"/>
+        </insert>
+        <insert tableName="ACTIVITY">
+            <column name="ACTIVITYID" value="de110a35-bcab-407e-9d60-7a65f028159b"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="DATE_NEW" valueDate="2018-08-03T12:02:52"/>
+            <column name="SUBJECT" value="Muster"/>
+            <column name="INFO" value="Spezifikation ausgefüllt und abgeschickt"/>
+            <column name="CATEGORY" valueNumeric="1"/>
+            <column name="DIRECTION" value="o"/>
+            <column name="ENTRYDATE" valueDate="2018-06-03T12:41:22"/>
+        </insert>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="b111a1da-39f2-48ae-93a5-bad704e5ae48"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="de110a35-bcab-407e-9d60-7a65f028159b"/>
+            <column name="OBJECT2_TYPE" value="Pers_context"/>
+            <column name="OBJECT2_ROWID" value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="DATE_NEW" valueDate="2018-06-03T14:02:52"/>
+        </insert>
+        <rollback>
+            <delete tableName="AB_OBJECTRELATION">
+                <where>OBJECT1_TYPE = ? and OBJECT1_ROWID = ?</where>
+                <whereParams>
+                    <param value="Activity_context" />
+                    <param value="de110a35-bcab-407e-9d60-7a65f028159b" />
+                </whereParams>
+            </delete>
+            <delete tableName="ACTIVITY">
+                <where>ACTIVITYID = ?</where>
+                <whereParams>
+                    <param value="de110a35-bcab-407e-9d60-7a65f028159b" />
+                </whereParams>
+            </delete>
+            <delete tableName="ADDRESS">
+                <where>ADDRESSID = ?</where>
+                <whereParams>
+                    <param value="14d01332-985b-4efe-a634-da71ae482907" />
+                </whereParams>
+            </delete>
+            <delete tableName="COMM">
+                <where>COMMID = ?</where>
+                <whereParams>
+                    <param value="22d01219-985b-4efe-a634-da71ae482907" />
+                </whereParams>
+            </delete>
+            <delete tableName="COMM">
+                <where>COMMID = ?</where>
+                <whereParams>
+                    <param value="14d01219-985b-4efe-a634-da71ae482907" />
+                </whereParams>
+            </delete>
+            <delete tableName="RELATION">
+                <where>RELATIONID = ?</where>
+                <whereParams>
+                    <param value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d" />
+                </whereParams>
+            </delete>
+            <delete tableName="PERS">
+                <where>PERSID = ?</where>
+                <whereParams>
+                    <param value="a2e084e2-d68a-4f1e-a1bb-f8d46ad6293d" />
+                </whereParams>
+            </delete>
+        </rollback>
+    </changeSet>
 
 
 </databaseChangeLog>
diff --git a/others/db_changes/data_alias/data/example_pers/PERS_sommer.xml b/others/db_changes/data_alias/data/example_pers/PERS_sommer.xml
index fc858c5e7dc6852e38b7806db5d8a9487844112d..66fcd61d46947fce1a0660bdb97105e138f71ee3 100644
--- a/others/db_changes/data_alias/data/example_pers/PERS_sommer.xml
+++ b/others/db_changes/data_alias/data/example_pers/PERS_sommer.xml
@@ -1,125 +1,125 @@
 <?xml version="1.1" encoding="UTF-8" standalone="no"?>
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
-<changeSet author="t.feldmann" id="efc45d2-a40d-49e0-a24c-afab6095d1cb">
-	<insert tableName="PERS">
-		<column name="PERSID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
-		<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-		<column name="DATEOFBIRTH" valueDate="1988-13-01"/>
-		<column name="USER_NEW" value="admin"/>
-		<column name="FIRSTNAME" value="Lisa"/>
-		<column name="MIDDLENAME" value=""/>
-		<column name="LASTNAME" value="Sommer"/>
-		<column name="GENDER" value="f"/>
-		<column name="SALUTATION" value="Frau"/>
-	</insert>
-	<insert tableName="RELATION">
-                <column name="RELATIONSHIP" valueNumeric="1"/>
-                <column name="LANGUAGE" value="de-DE"/>
-		<column name="RELATIONID" value="56e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
-		<column name="PERS_ID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
-		<column name="ORG_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
-		<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-		<column name="USER_NEW" value="admin"/>
-		<column name="STATUS" valueNumeric="1"/>
-	</insert>
-	<insert tableName="COMM">
-			<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="COMMID" value="14d05619-985b-4efe-a634-da71ae482907"/>
-			<column name="RELATION_ID" value="56e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
-			<column name="MEDIUM_ID" valueNumeric="1"/>
-			<column name="ADDR" value="sommer@gfk.de"/>
-			<column name="STANDARD" valueNumeric="1"/>
-	</insert>
-	<insert tableName="COMM">
-			<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="COMMID" value="58d01219-985b-4efe-a634-da71ae482907"/>
-			<column name="RELATION_ID" value="56e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
-			<column name="MEDIUM_ID" valueNumeric="2"/>
-			<column name="ADDR" value="087631333"/>
-			<column name="STANDARD" valueNumeric="0"/>
-	</insert>
-	<insert tableName="ADDRESS">
-			<column name="STATE" value="Bayern"/>
-			<column name="ADDR_TYPE" valueNumeric="2"/>
-			<column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
-			<column name="CITY" value="Landshut"/>
-			<column name="COUNTRY" value="DE"/>
-			<column name="RELATION_ID" value="56e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="ADDRIDENTIFIER" value=""/>
-			<column name="REGION" value="Niederbayern"/>
-			<column name="ADDRESSID" value="11d01332-985b-4efe-a634-da71ae482907"/>
-			<column name="BUILDINGNO" value="12"/>
-			<column name="ADDRESSADDITION"/>
-			<column name="ZIP" value="84034"/>
-			<column name="ADDRESS" value="Neustadt"/>
-			<column name="DISTRICT" value="Niederbayern"/>
-	</insert>
-	<insert tableName="ACTIVITY">
-			<column name="ACTIVITYID" value="aa110a35-bcab-407e-9d60-7a65f028159b"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="DATE_NEW" valueDate="2018-02-12T12:02:52"/>
-			<column name="SUBJECT" value="Angebot nachfassen"/>
-			<column name="INFO" value="Angebot nachfassen, wir liegen vor Wettbewerb"/>
-			<column name="CATEGORY" valueNumeric="1"/>
-			<column name="DIRECTION" value="o"/>
-			<column name="ENTRYDATE" valueDate="2018-06-03T12:41:22"/>
-	</insert>
-	<insert tableName="ACTIVITYLINK">
-			<column name="ACTIVITYLINKID" value="a331a1da-39f2-48ae-93a5-bad704e5ae48"/>
-			<column name="ACTIVITY_ID" value="aa110a35-bcab-407e-9d60-7a65f028159b"/>
-			<column name="ROW_ID" value="56e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
-			<column name="USER_NEW" value="admin"/>
-			<column name="DATE_NEW" valueDate="2018-02-12T14:02:52"/>
-			<column name="OBJECT_ID" value="Pers_context"/>
-	</insert>
-	<rollback>
-		<delete tableName="ACTIVITYLINK">
-				<where>ACTIVITYLINKID = ?</where>
-				<whereParams>
-						<param value="a331a1da-39f2-48ae-93a5-bad704e5ae48" />
-				</whereParams>
-		</delete>
-		<delete tableName="ACTIVITY">
-				<where>ACTIVITYID = ?</where>
-				<whereParams>
-						<param value="aa110a35-bcab-407e-9d60-7a65f028159b" />
-				</whereParams>
-		</delete>
-		<delete tableName="ADDRESS">
-			<where>ADDRESSID = ?</where>
-			<whereParams>
-				<param value="11d01332-985b-4efe-a634-da71ae482907" />
-			</whereParams>
-		</delete>
-		<delete tableName="COMM">
-			<where>COMMID = ?</where>
-			<whereParams>
-				<param value="58d01219-985b-4efe-a634-da71ae482907" />
-			</whereParams>
-		</delete>
-		<delete tableName="COMM">
-			<where>COMMID = ?</where>
-			<whereParams>
-				<param value="14d05619-985b-4efe-a634-da71ae482907" />
-			</whereParams>
-		</delete>
-		<delete tableName="RELATION">
-			<where>RELATIONID = ?</where>
-			<whereParams>
-				<param value="56e084e2-d68a-4f1e-a1bb-f8d46ad6293d" />
-			</whereParams>
-		</delete>
-		<delete tableName="PERS">
-			<where>PERSID = ?</where>
-			<whereParams>
-				<param value="ef345d11-a40d-59e0-a24c-afcb6095d2cb" />
-			</whereParams>
-		</delete>
-	</rollback>
-</changeSet>
-
-
-</databaseChangeLog>
+    <changeSet author="t.feldmann" id="efc45d2-a40d-49e0-a24c-afab6095d1cb">
+        <insert tableName="PERS">
+            <column name="PERSID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="DATEOFBIRTH" valueDate="1988-13-01"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="FIRSTNAME" value="Lisa"/>
+            <column name="MIDDLENAME" value=""/>
+            <column name="LASTNAME" value="Sommer"/>
+            <column name="GENDER" value="f"/>
+            <column name="SALUTATION" value="Frau"/>
+        </insert>
+        <insert tableName="RELATION">
+            <column name="RELATIONSHIP" valueNumeric="1"/>
+            <column name="LANGUAGE" value="de-DE"/>
+            <column name="RELATIONID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
+            <column name="PERS_ID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
+            <column name="ORG_ID" value="b219b58a-f120-42d8-9a64-0b176501eac7"/>
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="STATUS" valueNumeric="1"/>
+        </insert>
+        <insert tableName="COMM">
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="COMMID" value="14d05619-985b-4efe-a634-da71ae482907"/>
+            <column name="RELATION_ID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
+            <column name="MEDIUM_ID" valueNumeric="1"/>
+            <column name="ADDR" value="sommer@gfk.de"/>
+            <column name="STANDARD" valueNumeric="1"/>
+        </insert>
+        <insert tableName="COMM">
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="COMMID" value="58d01219-985b-4efe-a634-da71ae482907"/>
+            <column name="RELATION_ID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
+            <column name="MEDIUM_ID" valueNumeric="2"/>
+            <column name="ADDR" value="087631333"/>
+            <column name="STANDARD" valueNumeric="0"/>
+        </insert>
+        <insert tableName="ADDRESS">
+            <column name="STATE" value="Bayern"/>
+            <column name="ADDR_TYPE" valueNumeric="2"/>
+            <column name="DATE_NEW" valueDate="2018-07-02T00:00:00"/>
+            <column name="CITY" value="Landshut"/>
+            <column name="COUNTRY" value="DE"/>
+            <column name="RELATION_ID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="ADDRIDENTIFIER" value=""/>
+            <column name="REGION" value="Niederbayern"/>
+            <column name="ADDRESSID" value="11d01332-985b-4efe-a634-da71ae482907"/>
+            <column name="BUILDINGNO" value="12"/>
+            <column name="ADDRESSADDITION"/>
+            <column name="ZIP" value="84034"/>
+            <column name="ADDRESS" value="Neustadt"/>
+            <column name="DISTRICT" value="Niederbayern"/>
+        </insert>
+        <insert tableName="ACTIVITY">
+            <column name="ACTIVITYID" value="aa110a35-bcab-407e-9d60-7a65f028159b"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="DATE_NEW" valueDate="2018-02-12T12:02:52"/>
+            <column name="SUBJECT" value="Angebot nachfassen"/>
+            <column name="INFO" value="Angebot nachfassen, wir liegen vor Wettbewerb"/>
+            <column name="CATEGORY" valueNumeric="1"/>
+            <column name="DIRECTION" value="o"/>
+            <column name="ENTRYDATE" valueDate="2018-06-03T12:41:22"/>
+        </insert>
+        <insert tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" value="a331a1da-39f2-48ae-93a5-bad704e5ae48"/>
+            <column name="OBJECT1_TYPE" value="Activity_context"/>
+            <column name="OBJECT1_ROWID" value="aa110a35-bcab-407e-9d60-7a65f028159b"/>
+            <column name="OBJECT2_TYPE" value="Pers_context"/>
+            <column name="OBJECT2_ROWID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
+            <column name="USER_NEW" value="admin"/>
+            <column name="DATE_NEW" valueDate="2018-02-12T14:02:52"/>
+        </insert>
+        <rollback>
+            <delete tableName="AB_OBJECTRELATION">
+                <where>OBJECT1_TYPE = ? and OBJECT1_ROWID = ?</where>
+                <whereParams>
+                    <param value="Activity_context" />
+                    <param value="de110a35-bcab-407e-9d60-7a65f028159b" />
+                </whereParams>
+            </delete>
+            <delete tableName="ACTIVITY">
+                <where>ACTIVITYID = ?</where>
+                <whereParams>
+                    <param value="aa110a35-bcab-407e-9d60-7a65f028159b" />
+                </whereParams>
+            </delete>
+            <delete tableName="ADDRESS">
+                <where>ADDRESSID = ?</where>
+                <whereParams>
+                    <param value="11d01332-985b-4efe-a634-da71ae482907" />
+                </whereParams>
+            </delete>
+            <delete tableName="COMM">
+                <where>COMMID = ?</where>
+                <whereParams>
+                    <param value="58d01219-985b-4efe-a634-da71ae482907" />
+                </whereParams>
+            </delete>
+            <delete tableName="COMM">
+                <where>COMMID = ?</where>
+                <whereParams>
+                    <param value="14d05619-985b-4efe-a634-da71ae482907" />
+                </whereParams>
+            </delete>
+            <delete tableName="RELATION">
+                <where>RELATIONID = ?</where>
+                <whereParams>
+                    <param value="ef345d11-a40d-59e0-a24c-afcb6095d2cb" />
+                </whereParams>
+            </delete>
+            <delete tableName="PERS">
+                <where>PERSID = ?</where>
+                <whereParams>
+                    <param value="ef345d11-a40d-59e0-a24c-afcb6095d2cb" />
+                </whereParams>
+            </delete>
+        </rollback>
+    </changeSet>
+</databaseChangeLog>
\ No newline at end of file
diff --git a/others/db_changes/data_alias/data/example_task/base.xml b/others/db_changes/data_alias/data/example_task/base.xml
index 2f992f964951776d7907d1f28329d6c8492e09a5..c252eace75ed12e45f906ed423f39aae0f56748a 100644
--- a/others/db_changes/data_alias/data/example_task/base.xml
+++ b/others/db_changes/data_alias/data/example_task/base.xml
@@ -11,8 +11,8 @@
             <column name="USER_NEW" value="admin">
                 <constraints nullable="false"/>
             </column>
-            <column name="REQUESTOR_RELATION_ID" value="56e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
-            <column name="EDITOR_RELATION_ID" value="56e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
+            <column name="REQUESTOR_RELATION_ID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
+            <column name="EDITOR_RELATION_ID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
 
             <column name="CODE" valueNumeric="10000"/>
             <column name="SUBJECT" value="effiziente Wertschöpfungsketten bündeln und anlaysieren"/>
@@ -38,8 +38,8 @@
             <column name="USER_NEW" value="admin">
                 <constraints nullable="false"/>
             </column>
-            <column name="REQUESTOR_RELATION_ID" value="56e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
-            <column name="EDITOR_RELATION_ID" value="56e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
+            <column name="REQUESTOR_RELATION_ID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
+            <column name="EDITOR_RELATION_ID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
 
             <column name="CODE" valueNumeric="10001"/>
             <column name="SUBJECT" value="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."/>
@@ -65,8 +65,8 @@
             <column name="USER_NEW" value="admin">
                 <constraints nullable="false"/>
             </column>
-            <column name="REQUESTOR_RELATION_ID" value="56e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
-            <column name="EDITOR_RELATION_ID" value="56e084e2-d68a-4f1e-a1bb-f8d46ad6293d"/>
+            <column name="REQUESTOR_RELATION_ID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
+            <column name="EDITOR_RELATION_ID" value="ef345d11-a40d-59e0-a24c-afcb6095d2cb"/>
 
             <column name="CODE" valueNumeric="10002"/>
             <column name="SUBJECT" value="Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris"/>
diff --git a/others/db_changes/data_alias/struct/AditoBasic/create_ab_objectrelation.xml b/others/db_changes/data_alias/struct/AditoBasic/create_ab_objectrelation.xml
index f57da00c892fbb4aa4da99411f1041e1c2eba726..1025daf6219618da19136905ef85ce30c1cd85ae 100644
--- a/others/db_changes/data_alias/struct/AditoBasic/create_ab_objectrelation.xml
+++ b/others/db_changes/data_alias/struct/AditoBasic/create_ab_objectrelation.xml
@@ -1,9 +1,9 @@
 <?xml version="1.1" encoding="UTF-8" standalone="no"?>
 <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
     <changeSet author="j.hoermann" id="4940acf4-7436-406b-9893-a1f1441ece37">
-        <createTable tableName="AB_OBJECTREALTION">
-            <column name="AB_OBJECTREALTIONID" type="CHAR(36)">
-                <constraints primaryKey="true" primaryKeyName="PK_AB_OBJECTREALTION_AB_OBJECTREALTIONID"/>
+        <createTable tableName="AB_OBJECTRELATION">
+            <column name="AB_OBJECTRELATIONID" type="CHAR(36)">
+                <constraints primaryKey="true" primaryKeyName="PK_AB_OBJECTRELATION_AB_OBJECTRELATIONID"/>
             </column>
             <column name="OBJECT1_TYPE" type="NVARCHAR(50)">
                 <constraints nullable="false"/>
@@ -14,7 +14,7 @@
             <column name="OBJECT2_TYPE" type="NVARCHAR(63)">
                 <constraints nullable="false"/>
             </column>
-            <column name="OBJECT2_ROWID" type="CHAR(63)">
+            <column name="OBJECT2_ROWID" type="CHAR(36)">
                 <constraints nullable="false"/>
             </column>
             <column name="USER_NEW" type="NVARCHAR(50)">
@@ -26,5 +26,13 @@
             </column>
             <column name="DATE_EDIT" type="TIMESTAMP"/>
         </createTable>
+	<createIndex indexName="IDX_AB_OBJECTRELATION_OBJECT1" tableName="AB_OBJECTRELATION">
+            <column name="OBJECT1_TYPE"/>
+            <column name="OBJECT1_ROWID"/>
+	</createIndex>
+        <createIndex indexName="IDX_AB_OBJECTRELATION_OBJECT2" tableName="AB_OBJECTRELATION">
+            <column name="OBJECT2_TYPE"/>
+            <column name="OBJECT2_ROWID"/>
+	</createIndex>
     </changeSet>
 </databaseChangeLog>
\ No newline at end of file
diff --git a/others/db_changes/data_alias/struct/create_activitylink.xml b/others/db_changes/data_alias/struct/create_activitylink.xml
deleted file mode 100644
index 07ef524462c9a4e73a3312c61214280235f90bd0..0000000000000000000000000000000000000000
--- a/others/db_changes/data_alias/struct/create_activitylink.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.1" encoding="UTF-8" standalone="no"?>
-<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd">
-    <changeSet author="j.goderbauer" id="2434effa-6a42-490c-b9c3-d99608f23067">
-        <createTable tableName="ACTIVITYLINK">
-            <column name="ACTIVITYLINKID" type="CHAR(36)">
-                <constraints primaryKey="true" primaryKeyName="PK_ACTIVITY_ACTIVITYLINKID"/>
-            </column>
-            <column name="USER_NEW" type="NVARCHAR(50)">
-                <constraints nullable="false"/>
-            </column>
-            <column name="USER_EDIT" type="NVARCHAR(50)"/>
-            <column name="DATE_NEW" type="TIMESTAMP">
-                <constraints nullable="false"/>
-            </column>
-            <column name="DATE_EDIT" type="TIMESTAMP"/>
-            <column name="ROW_ID" type="CHAR(36)">
-                <constraints nullable="false"/><!--no FK here because this column can be connected to every other table-->
-            </column>
-            <column name="ACTIVITY_ID" type="CHAR(36)">
-                <constraints nullable="false" foreignKeyName="FK_ACTIVITYLINK_ACTIVITY_ID" references="ACTIVITY(ACTIVITYID)"/>
-            </column>
-            <column name="OBJECT_ID" type="NVARCHAR(36)"/>
-        </createTable>
-        <createIndex indexName="ACTIVITYLINK_ROW_OBJECT"
-            tableName="ACTIVITYLINK">
-            <column name="ROW_ID"/>
-            <column name="OBJECT_ID"/>
-        </createIndex>
-    </changeSet>
-</databaseChangeLog>
\ No newline at end of file
diff --git a/others/db_changes/masterChangelog.xml b/others/db_changes/masterChangelog.xml
index 1bdf1e87d10fb835e4208bf21b3fc89f298c58f4..b805a9c6776c219e9f6149e5f756ac4faef1679b 100644
--- a/others/db_changes/masterChangelog.xml
+++ b/others/db_changes/masterChangelog.xml
@@ -8,7 +8,6 @@
     <include file="data_alias/struct/create_org.xml"/>
     <include file="data_alias/struct/create_relation.xml"/>    
     <include file="data_alias/struct/create_activity.xml"/>
-    <include file="data_alias/struct/create_activitylink.xml"/>
     <include file="data_alias/struct/create_address.xml"/>
     <include file="data_alias/struct/create_comm.xml"/>
     <include file="data_alias/struct/create_contract.xml"/>
diff --git a/others/db_changes/system_alias/data/example_asys_binaries/Birgit_Leicht_Image.xml b/others/db_changes/system_alias/data/example_asys_binaries/Birgit_Leicht_Image.xml
index 857745312f78069ee539201152bbd7b490efcb1d..80f2fcff3a4a1a82f7c40cfb59613f92a55388a2 100644
--- a/others/db_changes/system_alias/data/example_asys_binaries/Birgit_Leicht_Image.xml
+++ b/others/db_changes/system_alias/data/example_asys_binaries/Birgit_Leicht_Image.xml
@@ -11,7 +11,7 @@
         <column name="FILENAME" value="ProfileImage"/>
         <column name="ID" value="ca8d0195-db3f-4b04-98be-9c46e060e67b"/>
         <column name="MIMETYPE" value="image/png"/>
-        <column name="ROW_ID" value="73d72bf8-e7f5-11e8-9f32-f2801f1b9fd1"/>
+        <column name="ROW_ID" value="73d72f18-e7f5-11e8-9f32-f2801f1b9fd1"/>
         <column name="TABLENAME" value="PERS"/>
         <column name="USER_EDIT" value="Admin"/>
         <column name="USER_NEW" value="Admin"/>
diff --git a/others/guide/HowToSqlConditionLib.adoc b/others/guide/HowToSqlConditionLib.adoc
index cf6e88901a74331c656b89f90903bc2c5592706f..5e4bc6394dc56223bff008f88fdd34c5fb16af67 100644
--- a/others/guide/HowToSqlConditionLib.adoc
+++ b/others/guide/HowToSqlConditionLib.adoc
@@ -44,7 +44,7 @@ myDescriptiveNameOfTheCondition.orPrepare(["PERS", "FIRSTNAME", "bob"], "Bob")
 * build sql
 [source,javascript]
 ----
-var myPreparedSelect = myDescriptiveNameOfTheCondition.buildSelect("select PERSID from PERS", "1 = 2", "order by FIRSTNAME");
+var myPreparedSelect = myDescriptiveNameOfTheCondition.buildSql("select PERSID from PERS", "1 = 2", "order by FIRSTNAME");
 ----
 * use the select
 [source,javascript]
@@ -58,7 +58,7 @@ You can do everything in one command also:
 var bobsId = db.cell(SqlCondition.begin(alias)
                 .orPrepare("PERS.FIRSTNAME", "Bob")
                 .orPrepare("PERS.LASTNAME", "Meier");
-                .buildSelect("select PERSID from PERS"));
+                .buildSql("select PERSID from PERS"));
 ----
 
 == available methods ==
@@ -142,12 +142,12 @@ Combines toString with the prepared values just like Adito needs it.
 var myPreparedStatementArray = myDescriptiveNameOfTheCondition.build("1=0");
 ----
 
-=== buildSelect ===
+=== buildSql ===
 Same as build and adds a string before and after the condition.
 
 [source,javascript]
 ----
-var myPreparedStatementArray = myDescriptiveNameOfTheCondition.buildSelect("select * from PERS", "1=0", "order by FIRSTNAME");
+var myPreparedStatementArray = myDescriptiveNameOfTheCondition.buildSql("select * from PERS", "1=0", "order by FIRSTNAME");
 ----
 
 == real world example ==
@@ -162,7 +162,7 @@ var productPriceData = (db.ROW, db.array(SqlCondition.begin()
                     .andSqlCondition(SqlCondition.begin()
                         .orPrepare("PRODUCTPRICE.VALID_TO", today, "# >= ?")
                         .or("PRODUCTPRICE.VALID_TO is null"), "1 = 2");
-                    .buildSelect("select PRICE, CURRENCY from PRODUCTPRICE", "1 = 2", "order by VALID_FROM desc")));
+                    .buildSql("select PRICE, CURRENCY from PRODUCTPRICE", "1 = 2", "order by VALID_FROM desc")));
 ----
 
 With a loop:
diff --git a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod
index 1fcf8c780820f5852cd9b64a0e60e7f18eec3766..3f9daeb173f0de1d87682e389317618aba75d421 100644
--- a/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod
+++ b/preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod
@@ -2,7 +2,7 @@
 <preferences xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="3.0.3" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/preferences/3.0.3">
   <name>_____PREFERENCES_PROJECT</name>
   <majorModelMode>DISTRIBUTED</majorModelMode>
-  <projectName>xRM-Basic TIKAL</projectName>
+  <projectName>basic 2019</projectName>
   <jditoMaxContentSize v="57671680" />
   <calendarCategoriesEvent>
     <entry>
diff --git a/process/Comm_lib/process.js b/process/Comm_lib/process.js
index 74f599da9289886306d570798f437cf08ac0633c..af8efce39233863d38da78dbea1d9c7496b85158 100644
--- a/process/Comm_lib/process.js
+++ b/process/Comm_lib/process.js
@@ -135,7 +135,7 @@ CommUtil.getStandardSubSqlForCategory = function(pCategory, pRelationField)
     
     cond.and("COMM.STANDARD = 1");
     
-    var res = db.translateStatement(cond.buildSelect("select max(COMM.ADDR) from COMM", "1=0"));
+    var res = db.translateStatement(cond.buildSql("select max(COMM.ADDR) from COMM", "1=0"));
     return res;
 };
 
diff --git a/process/ObjectRelation_lib/ObjectRelation_lib.aod b/process/ObjectRelation_lib/ObjectRelation_lib.aod
new file mode 100644
index 0000000000000000000000000000000000000000..77cc2f184e4c94f8e0a4bde129557dcb4873bb49
--- /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.1.7" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/process/1.1.7">
+  <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..9a4604f1bfbf6988c22afb972b8237a9fa02bcfa
--- /dev/null
+++ b/process/ObjectRelation_lib/process.js
@@ -0,0 +1,14 @@
+import("system.vars");
+import("Context_lib");
+import("Sql_lib");
+
+/**
+ * This class provides functions for managing object relations
+ * 
+ * Do not create an instance of this
+ * 
+ * @class
+ */
+function ObjectRelationUtils() {}
+
+// TODO
\ No newline at end of file
diff --git a/process/OfferOrder_lib/process.js b/process/OfferOrder_lib/process.js
index c75347a393fae5e6c04f3ab793c1e33421cae87c..78375a40824f284cbd831ef642e06158bc2b8cf3 100644
--- a/process/OfferOrder_lib/process.js
+++ b/process/OfferOrder_lib/process.js
@@ -171,7 +171,7 @@ ItemUtils.prototype.getNetAndVat = function(itemIds) {
         });
     }
 
-    var orderItems = db.table(condition.buildSelect("select QUANTITY, PRICE, DISCOUNT, VAT, OPTIONAL from " + this.tableName + "ITEM", "1 = 0"));   
+    var orderItems = db.table(condition.buildSql("select QUANTITY, PRICE, DISCOUNT, VAT, OPTIONAL from " + this.tableName + "ITEM", "1 = 0"));   
 
     for (var i = 0; i < orderItems.length; i++)
     {
diff --git a/process/Offer_lib/process.js b/process/Offer_lib/process.js
index 8dfc0cc10ee597ab03933c35caffbddea29074ad..99dcb921db2a799011f8877b3ccd3e4ff3c56dae 100644
--- a/process/Offer_lib/process.js
+++ b/process/Offer_lib/process.js
@@ -106,7 +106,7 @@ OfferUtils.openOfferReport = function(pOfferID)
                      + " inner join OFFER on (OFFERITEM.OFFER_ID = OFFER.OFFERID)";
    
     var offerCondition = SqlCondition.begin().andPrepare("OFFER.OFFERID", pOfferID);
-    var rptdata = db.table(offerCondition.buildSelect("select " + fields.join(", ") + offerFromSql, "1 = 0"));
+    var rptdata = db.table(offerCondition.buildSql("select " + fields.join(", ") + offerFromSql, "1 = 0"));
     
     var language = KeywordUtils.get("LANGUAGE", rptdata[0][2])[1];
     var relid = rptdata[0][1];
@@ -129,7 +129,7 @@ OfferUtils.openOfferReport = function(pOfferID)
     
     var countDiscounts = db.cell(SqlCondition.begin()
                                              .andPrepare("OFFER.OFFERID", pOfferID)
-                                             .buildSelect("select count(OFFERITEM.DISCOUNT)" + offerFromSql, "1 = 0"));
+                                             .buildSql("select count(OFFERITEM.DISCOUNT)" + offerFromSql, "1 = 0"));
 
 
     for(var i = 0; i < rptdata.length; i++)
diff --git a/process/Org_lib/process.js b/process/Org_lib/process.js
index b9c5d9e734bd63542d3e8e09cb211804b72c9e17..4f8ac77408e18f137630d818d98819cbadced639 100644
--- a/process/Org_lib/process.js
+++ b/process/Org_lib/process.js
@@ -62,14 +62,14 @@ OrgUtils.openOrgReport = function(pOrgId)
     //org info
     var info = db.cell(SqlCondition.begin()
         .andPrepare("ORG.ORGID", pOrgId)
-        .buildSelect("select ORG.INFO from ORG"));
+        .buildSql("select ORG.INFO from ORG"));
     
     //communication data of the organization
     var commSql = "select MEDIUM_ID, ADDR from COMM";
     commSql = SqlCondition.begin()
         .andPrepare("COMM.RELATION_ID", relationId)
         .and("STANDARD = 1")
-        .buildSelect(commSql);
+        .buildSql(commSql);
     var commData = db.table(commSql);
     
     //resolve keyword
@@ -86,7 +86,7 @@ OrgUtils.openOrgReport = function(pOrgId)
     persSql = SqlCondition.begin()
         .andPrepare("RELATION.ORG_ID", pOrgId)
         .and("RELATION.STATUS = 1")
-        .buildSelect(persSql, "", " order by PERS.LASTNAME asc");
+        .buildSql(persSql, "", " order by PERS.LASTNAME asc");
     var persData = db.table(persSql);
     
     //TODO: get the keywords in another way when keywords are entitys
@@ -107,7 +107,7 @@ OrgUtils.openOrgReport = function(pOrgId)
             .andPrepare("COMM.RELATION_ID", persData[i][5])
             .and("MEDIUM_ID in (" + mediumIds + ")")
             .and("STANDARD = 1")
-            .buildSelect(persCommSql);
+            .buildSql(persCommSql);
         var persDataComm = db.table(persCommSql);
         
         //resolve keyword
@@ -125,7 +125,7 @@ OrgUtils.openOrgReport = function(pOrgId)
         + " left join PERS on RELATION.PERS_ID = PERSID";
     histSql = SqlCondition.begin()
         .andPrepare("RELATION.ORG_ID", pOrgId)   //= all activities linked to the organization or an employee
-        .buildSelect(histSql, "", "order by ENTRYDATE desc");
+        .buildSql(histSql, "", "order by ENTRYDATE desc");
     var histData = db.table(histSql);
     
     var dateFormat = translate.text("dd.MM.yyyy");
@@ -146,7 +146,7 @@ OrgUtils.openOrgReport = function(pOrgId)
         + " left join PERS on RELATION.PERS_ID = PERSID";
     taskSql = SqlCondition.begin()
         .andPrepare("RELATION.ORG_ID", pOrgId)
-        .buildSelect(taskSql);
+        .buildSql(taskSql);
     var taskData = db.table(taskSql);
     
     taskData.forEach(function (row) 
diff --git a/process/PostalAddress_lib/process.js b/process/PostalAddress_lib/process.js
index 394f05bac8a0dc643dbe3e945c106c5cce47f4ea..978385e1c18b6011f1e61bb28674c823016f0251 100644
--- a/process/PostalAddress_lib/process.js
+++ b/process/PostalAddress_lib/process.js
@@ -46,11 +46,11 @@ AddressUtils.formatOneline = function (pCountry, pAddressLine, pBuildingNo, pZip
  * @return {String}
  */
 AddressUtils.getAddress = function(pRelationId) {
-    var address = db.array(db.ROW, SqlCondition.begin().andPrepare("RELATION.RELATIONID", pRelationId).buildSelect('select RELATIONID, ADDRESS, BUILDINGNO, ZIP, CITY, "NAME", FIRSTNAME, LASTNAME, TITLE from' + RelationUtils.getFullRelationFromString(), "1=0"));
+    var address = db.array(db.ROW, SqlCondition.begin().andPrepare("RELATION.RELATIONID", pRelationId).buildSql('select RELATIONID, ADDRESS, BUILDINGNO, ZIP, CITY, "NAME", FIRSTNAME, LASTNAME, TITLE from' + RelationUtils.getFullRelationFromString(), "1=0"));
     
     // TODO: currently there are some relations without standard address. Use Hardcoded one.
     if (!address[1]) {
-        var dummyAddress = db.array(db.ROW, SqlCondition.begin().andPrepare("ADDRESS.ADDRESSID", '97d37aea-d7f8-4436-bb31-875439f5f7f1').buildSelect('select ADDRESS, BUILDINGNO, ZIP, CITY from ADDRESS', "1=0"));
+        var dummyAddress = db.array(db.ROW, SqlCondition.begin().andPrepare("ADDRESS.ADDRESSID", '97d37aea-d7f8-4436-bb31-875439f5f7f1').buildSql('select ADDRESS, BUILDINGNO, ZIP, CITY from ADDRESS', "1=0"));
         address[1] = dummyAddress[0];
         address[2] = dummyAddress[1];
         address[3] = dummyAddress[2];
@@ -72,12 +72,12 @@ AddressUtils.getAddress = function(pRelationId) {
 AddressUtils.getAddressById = function(pAddressId) {
     var address = db.array(db.ROW, SqlCondition.begin()
                                                .andPrepare("ADDRESS.ADDRESSID", pAddressId)
-                                               .buildSelect("select RELATION_ID, ADDRESS, BUILDINGNO, ZIP, CITY from "
+                                               .buildSql("select RELATION_ID, ADDRESS, BUILDINGNO, ZIP, CITY from "
                                                           + "ADDRESS", "1=0"));
     
     // TODO: currently there are some relations without standard address. Use Hardcoded one.
     if (!address[1]) {
-        var dummyAddress = db.array(db.ROW, SqlCondition.begin().andPrepare("ADDRESS.ADDRESSID", '97d37aea-d7f8-4436-bb31-875439f5f7f1').buildSelect('select RELATION_ID, ADDRESS, BUILDINGNO, ZIP, CITY from ADDRESS', "1=0"));
+        var dummyAddress = db.array(db.ROW, SqlCondition.begin().andPrepare("ADDRESS.ADDRESSID", '97d37aea-d7f8-4436-bb31-875439f5f7f1').buildSql('select RELATION_ID, ADDRESS, BUILDINGNO, ZIP, CITY from ADDRESS', "1=0"));
         address[0] = dummyAddress[0];
         address[1] = dummyAddress[1];
         address[2] = dummyAddress[2];
@@ -89,7 +89,7 @@ AddressUtils.getAddressById = function(pAddressId) {
 
     var names = db.array(db.ROW, SqlCondition.begin()
                                              .andPrepare("RELATION.RELATIONID", address[0])
-                                             .buildSelect("select ORG.NAME, FIRSTNAME, LASTNAME, TITLE from RELATION left join PERS on PERSID = PERS_ID left join ORG on ORGID = ORG_ID"
+                                             .buildSql("select ORG.NAME, FIRSTNAME, LASTNAME, TITLE from RELATION left join PERS on PERSID = PERS_ID left join ORG on ORGID = ORG_ID"
                                                             , "1=0"));
     return AddressUtils.formatAddress(type, address[1], address[2], address[3], address[4], names[0], names[1], names[2], names[3]);
 }
@@ -134,7 +134,7 @@ AddressUtils.formatAddress = function(pAddrType, pAddress, pBuildingno, pZip, pC
  */
 AddressUtils.getAllPossibleAddresses = function(pRelationId) {
     var addresses = db.table(SqlCondition.begin().andPrepare("RELATION.RELATIONID", pRelationId)
-                                                     .buildSelect("select ADDRESSID, ADDR_TYPE, ADDRIDENTIFIER from ADDRESS join RELATION on RELATIONID = RELATION_ID or RELATION_ID = ORG_ID", "1=0"));
+                                                     .buildSql("select ADDRESSID, ADDR_TYPE, ADDRIDENTIFIER from ADDRESS join RELATION on RELATIONID = RELATION_ID or RELATION_ID = ORG_ID", "1=0"));
                                                      
     return addresses.map(function(pAddress) {
         return [pAddress[0], KeywordUtils.get("ADDRESS.TYPE", pAddress[1])[1] + " " + pAddress[2]]
@@ -175,7 +175,7 @@ AddressValidationUtils._getRequiredFields = function(countryCode)
     if (!countryCode)
         return "";
     var requiredFields = db.cell(SqlCondition.begin().andPrepare("COUNTRYINFO.ISO2", countryCode)
-                                                     .buildSelect("select COUNTRYINFO.REQUIRED_FIELDS from COUNTRYINFO"));
+                                                     .buildSql("select COUNTRYINFO.REQUIRED_FIELDS from COUNTRYINFO"));
     return requiredFields;
 };
 
@@ -206,7 +206,7 @@ AddressValidationUtils._getZipValidationRegEx = function(countryCode)
         return "";
     var cond = new SqlCondition();
     cond.andPrepare("COUNTRYINFO.ISO2", countryCode );
-    var stmt = cond.buildSelect("select COUNTRYINFO.ZIP_REGEX from COUNTRYINFO");
+    var stmt = cond.buildSql("select COUNTRYINFO.ZIP_REGEX from COUNTRYINFO");
     return db.cell(stmt);
 };
 
diff --git a/process/Product_lib/process.js b/process/Product_lib/process.js
index 52b718a5683465b087b10e4919d8473d262652bf..ceb0f67234b9a2845221bdad226208dd912432f3 100644
--- a/process/Product_lib/process.js
+++ b/process/Product_lib/process.js
@@ -1,646 +1,646 @@
-import("system.util");
-import("system.SQLTYPES");
-import("system.datetime");
-import("system.db");
-import("system.vars");
-import("system.translate");
-import("Util_lib");
-import("Binary_lib");
-import("Sql_lib");
-import("Keyword_lib");
-import("Data_lib");
-
-/**
- * utility functions for products
- * Do not create an instance of this!
- * 
- * @class
- */
-function ProductUtils() {}
-
-/**
- * Delivers the currently valid product price 
- * 
- * @param {String} pid ProductID
- * @param {String} buySell possible values: PP, SP
- * 
- * @example productUtils.getCurrentProductPrice(vars.get("$field.PRODUCTID"), "PP")
- * 
- * @return {String} currently valid product price
- */
-ProductUtils.getCurrentProductPrice = function(pid, buySell) {
-    if (pid != undefined && pid != "" && buySell != undefined && buySell != "")
-    {
-        var today = datetime.clearTime(vars.get("sys.date"), "utc");
-        var actualPriceCondition = SqlCondition.begin()
-                    .andPrepare("PRODUCTPRICE.BUYSELL", buySell)
-                    .andPrepare("PRODUCTPRICE.PRODUCT_ID", pid)
-                    .andPrepare("PRODUCTPRICE.CURRENCY", 1) // TODO: warum ist Currency hardgecoded auf 1??
-                    .andPrepare("PRODUCTPRICE.VALID_FROM", today, "# <= ?")
-                    .andSqlCondition(SqlCondition.begin()
-                        .orPrepare("PRODUCTPRICE.VALID_TO", today, "# >= ?")
-                        .or("PRODUCTPRICE.VALID_TO is null"), "1 = 2");
-                            
-        var productPriceData = db.array(db.ROW, actualPriceCondition.buildSelect("select PRICE, CURRENCY from PRODUCTPRICE", "1 = 2", "order by VALID_FROM desc"));
-        
-        if (productPriceData[0] && productPriceData[1])
-            return  productPriceData[0] + " " + KeywordUtils.get("CURRENCY", productPriceData[1])[1];
-        else
-            return "";
-    } else {
-        throw new Error(); // TODO: add message
-    }
-}
-
-/**
- * Delivers the stock
- * 
- * @param {String} pid ProductID
- * 
- * @example productUtils.getStockCount(vars.get("$field.PRODUCTID"))
- * 
- * @return {String} stock count
- */
-ProductUtils.getStockCount = function(pid) {
-    if (pid != undefined && pid != "")
-    {
-        var sum = db.cell(SqlCondition.begin()
-                                      .andPrepare("STOCK.PRODUCT_ID", pid)
-                                      .buildSelect("select sum(QUANTITY * case IN_OUT when 0 then -1 else 1)"
-                                                 + " from STOCK"));
-        
-        if (sum == "")
-            sum = "0";
-
-        return sum;
-    }
-    else
-    {
-        throw new Error();//TODO: add message
-    }
-}
-
-/**
- * Delivers metadata and price lists of the passed product. 
- * If parameter "priceListFilter" is passed valid price lists and the 
- * current price list to use for offer/order are delivered.
- * 
- * @param {String} pid req ProductID
- * @param {Object} priceListFilter opt { currency: "currencyValue", quantity: "quantityValue", relationId: "relationIdValue (for custom price lists)" }
- * @param {String[]} additionalProductInfoFields additional fields from Product
- *                   They are added to the result with the Fieldname as key. e.g. if the array is ["INFO"] the result will contain the key "INFO"
- * 
- * @example //Product_entity, Field: PRODUCT_ID, Process: onValueChange
- *          var pid = ProcessHandlingUtils.getOnValidationValue(vars.get("$field.PRODUCT_ID"));
- *          var curr = vars.exists("$param.Currency_param") ? vars.get("$param.Currency_param") : "";
- *          var relid = vars.exists("$param.RelationId_param") ? vars.get("$param.RelationId_param") : "";
- *          var pUtils = new ProductUtils();
- *          var PriceListFilter = { currency: curr, quantity: vars.get("$field.QUANTITY"), relationId: relid };
- *          var ProductDetails = pUtils.getProductDetails(pid, PriceListFilter, ["INFO"]);
- * 
- * @return {Object} { <br>
- *                   productId: "productid" <br>
- *                   , productName: "product name" <br>
- *                   , groupCode: "keyvalue of keyword 'GROUPCODE'" <br>
- *                   , unit: "keyvalue of keyword 'UNIT'" <br>
- *                   , PriceLists: {$pricelistid$ { <br>
- *                          priceListId: "pricelistid" <br>
- *                          , relationId: "relationid" when filled -> custom price list <br>
- *                          , priceList: "keyvalue of keyword 'PRICELIST'" <br>
- *                          , price: "price" <br>
- *                          , vat: "vat" <br>
- *                          , validFrom: TIMESTAMP <br>
- *                          , validTo: TIMESTAMP <br>
- *                          , buySell: "SP" / "PP" <br>
- *                          , fromQuantity: "fromquantity" <br>
- *                          , currency: "keyvalue of keyword 'CURRENCY'" <br>
- *                      } } <br>
- *                   , CurrentValidPriceLists: {$pricelistid$ { <br>
- *                          priceListId: "pricelistid" <br>
- *                          , relationId: "relationid" when filled -> custom price list <br>
- *                          , priceList: "keyvalue of keyword 'PRICELIST'" <br>
- *                          , price: "price" <br>
- *                          , vat: "vat" <br>
- *                          , validFrom: TIMESTAMP <br>
- *                          , validTo: TIMESTAMP <br>
- *                          , buySell: "SP" / "PP" <br>
- *                          , fromQuantity: "fromquantity" <br>
- *                          , currency: "keyvalue of keyword 'CURRENCY'" <br>
- *                      } } <br>
- *                   , PriceListToUse: {$pricelistid$ { <br>
- *                          priceListId: "pricelistid" <br>
- *                          , relationId: "relationid" when filled -> custom price list <br>
- *                          , priceList: "keyvalue of keyword 'PRICELIST'" <br>
- *                          , price: "price" <br>
- *                          , vat: "vat" <br>
- *                          , validFrom: TIMESTAMP <br>
- *                          , validTo: TIMESTAMP <br>
- *                          , buySell: "SP" / "PP" <br>
- *                          , fromQuantity: "fromquantity" <br>
- *                          , currency: "keyvalue of keyword 'CURRENCY'" <br>
- *                      } }, <br>
- *                   INFO: "the productinfo"
- *               }
- */
-ProductUtils.getProductDetails = function(pid, priceListFilter, additionalProductInfoFields)
-{
-    if (additionalProductInfoFields == undefined) {additionalProductInfoFields = []}
-    var ProductDetails = {};
-
-    var cols = [];
-    var colsProduct = ["PRODUCT.PRODUCTID", "PRODUCT.PRODUCTNAME", "PRODUCT.GROUPCODEID", "PRODUCT.UNIT"];
-    var defaultProductFieldCount = colsProduct.length;
-    colsProduct = colsProduct.concat(additionalProductInfoFields.map(function(item) {return "PRODUCT." + item}));
-    
-    cols = cols.concat(colsProduct);
-
-    var joins = [];
-    var orderby = ["PRODUCTID"];
-
-    //PriceList (all)
-    var colsPricelistAll = ["allPP.PRODUCTPRICEID", "allPP.RELATION_ID", "allPP.PRICELIST", "allPP.PRICE", "allPP.VAT"
-                        , "allPP.VALID_FROM", "allPP.VALID_TO", "allPP.BUYSELL", "allPP.FROMQUANTITY", "allPP.CURRENCY"];
-
-    cols = cols.concat(colsPricelistAll);
-    joins.push(" left join PRODUCTPRICE allPP on allPP.PRODUCT_ID = PRODUCTID ");
-
-    //PriceList (currently valid)
-    var validPriceLists = false;
-    if (priceListFilter != undefined 
-        && priceListFilter.currency != undefined && priceListFilter.currency != "" 
-        && priceListFilter.quantity != undefined && priceListFilter.quantity != "")
-    {
-        validPriceLists = true;
-        var colsPricelistValid = ["validPP.PRODUCTPRICEID", "validPP.RELATION_ID", "validPP.PRICELIST", "validPP.PRICE", "validPP.VAT"
-                        , "validPP.VALID_FROM", "validPP.VALID_TO", "validPP.BUYSELL", "validPP.FROMQUANTITY", "validPP.CURRENCY"];
-
-        cols = cols.concat(colsPricelistValid);
-        joins.push("left join PRODUCTPRICE validPP on " 
-                    + db.translateCondition(SqlCondition.begin()
-                               .and("validPP.PRODUCT_ID = PRODUCTID")
-                               .andPrepare(["PRODUCTPRICE", "CURRENCY", "validPP"], priceListFilter.currency)
-                               .andPrepare(["PRODUCTPRICE", "VALID_FROM", "validPP"], datetime.date().toString(), "# <= ?")
-                               .andPrepare(["PRODUCTPRICE", "FROMQUANTITY", "validPP"], priceListFilter.quantity, "# <= ?")
-                               .andSqlCondition(SqlCondition.begin()
-                                    .orPrepare(["PRODUCTPRICE", "RELATION_ID", "validPP"], priceListFilter.relationId, "# <= ?")
-                                    .orSqlCondition(SqlCondition.begin()
-                                        .and("validPP.RELATION_ID is null")
-                                        .andPrepare(["PRODUCTPRICE", "BUYSELL", "validPP"], 'SP'), 
-                                    "1 = 2"), 
-                                "1 = 2")
-                                .build("1 = 2")))
-    }
-    
-    var ProductDataSql = SqlCondition.begin()
-                            .andPrepare("PRODUCT.PRODUCTID", pid)
-                            .buildSelect("select " + cols.join(", ") + " from PRODUCT " + joins.join(" "),
-                                         "1 = 2",
-                                         "order by " + orderby.join(", "))
-
-    var ProductData = db.table(ProductDataSql);
-
-    for (var i = 0; i < ProductData.length; i++)
-    {
-        //Product
-        if (ProductDetails.productId == undefined)
-        {
-            ProductDetails = {
-                            productId: ProductData[i][0]
-                            , productName: ProductData[i][1]
-                            , groupCode: ProductData[i][2]
-                            , unit: ProductData[i][3]
-                            , PriceLists: {}
-                            , CurrentValidPriceLists: {}
-                            , PriceListToUse: null
-                        };
-                        
-            // add additional fields to the details
-            var countPos = defaultProductFieldCount;
-            additionalProductInfoFields.forEach(function(productField)
-            {
-                this[productField] = ProductData[i][countPos];
-                countPos++;
-            }, ProductDetails);
-        }
-        //Pricelist (all)
-        var colIdx = colsProduct.length;
-        if (ProductData[i][colIdx] != "" && ProductDetails.PriceLists[ProductData[i][colIdx]] == undefined) //Pricelist found
-        {
-            ProductDetails.PriceLists[ProductData[i][colIdx]] = _getPriceListObject();
-        }
-
-        //Pricelist (currently valid)
-        colIdx = colsProduct.length + colsPricelistAll.length;
-        if (validPriceLists)
-        {
-            if (ProductData[i][colIdx] != "" && ProductDetails.CurrentValidPriceLists[ProductData[i][colIdx]] == undefined) //Pricelist found
-            {
-                ProductDetails.CurrentValidPriceLists[ProductData[i][colIdx]] = _getPriceListObject();
-            }
-        }
-    }
-
-    if (validPriceLists)
-        ProductDetails.PriceListToUse = _getPriceListToUse(ProductDetails.CurrentValidPriceLists, priceListFilter);
-
-    return ProductDetails;
-
-    function _getPriceListObject() {
-        return {
-                priceListId: ProductData[i][colIdx++]
-                , relationId: ProductData[i][colIdx++]
-                , priceList: ProductData[i][colIdx++]
-                , price: ProductData[i][colIdx++]
-                , vat: ProductData[i][colIdx++]
-                , validFrom: ProductData[i][colIdx++]
-                , validTo: ProductData[i][colIdx++]
-                , buySell: ProductData[i][colIdx++]
-                , fromQuantity: ProductData[i][colIdx++]
-                , currency: ProductData[i][colIdx++]
-        };
-    }
-
-    //price list to use for offer/order
-    function _getPriceListToUse(priceLists, priceListFilter) {
-        for (var list in priceLists) {
-            //custom price (defined in Org -> Conditions)
-            if (priceListFilter.relationId != "" && priceListFilter.relationId == priceLists[list].relationId) {
-                return priceLists[list];
-            }
-            //customer deposited price list (defined by Attribute)
-            if (priceListFilter.priceList != "" && priceListFilter.priceList == priceLists[list].priceList) {
-                return priceLists[list];
-            }
-            //default price list
-            if (priceLists[list].priceList == "1") {
-                return priceLists[list];
-            }
-        }
-
-        //no valid price list found
-        return null;
-    }
-}
-
-/**
- * Checks if there is already an existing price list identical to the passed price list 
- * 
- * @param {String} pid ProductID
- * @param {Object} priceList { <br>
- *                                  priceList: "keyvalue of keyword 'PRICELIST'" <br>
- *                                  , validFrom: TIMESTAMP <br>
- *                                  , validTo: TIMESTAMP <br>
- *                                  , buySell: "SP" / "PP" <br>
- *                                  , fromQuantity: "fromquantity" <br>
- *                                  , currency: "keyvalue of keyword 'CURRENCY'" <br>
- *                             }
- * 
- * @example //Productprice_entity, Field: PRICELIST, Process: onValidation
- *          var pUtils = new ProductUtils();
- *          var priceList = {
- *                          priceList: ProcessHandlingUtils.getOnValidationValue(vars.get("$field.PRICELIST"))
- *                          , fromQuantity: vars.get("$field.FROMQUANTITY")
- *                          , buySell: vars.get("$field.BUYSELL")
- *                          , currency: vars.get("$field.CURRENCY")
- *                          , validFrom: vars.get("$field.VALID_FROM")
- *                          , validTo: vars.get("$field.VALID_TO")
- *                      };
- *
- *          var identicalPriceList = pUtils.checkForIndenticalPriceLists(vars.get("$field.PRODUCT_ID"), priceList);
- *          if (identicalPriceList != null)
- *          {
- *              result.string(translate.text("Identical price list found!"));
- *          }
- * 
- * @return {Object | null} null if no identical price list was found, otherwise the found price list
- */
-ProductUtils.checkForIndenticalPriceLists = function(pid, priceList) {
-    var PriceLists = this.getProductDetails(pid).PriceLists;
-
-    for (var pricelist in PriceLists) {
-        //equal price list
-        //equal fromquantity
-        //equal currency
-        //equal pp/sp
-        if (priceList.priceList == PriceLists[pricelist].priceList 
-            && priceList.fromQuantity == PriceLists[pricelist].fromQuantity 
-            && priceList.buySell == PriceLists[pricelist].buySell
-            && priceList.currency == PriceLists[pricelist].currency) {
-            
-            //identical validFrom & validTo
-            // OR NOT [ validFrom_new <= validFrom & validTo_new <= validTo
-            //        OR validFrom_new >= validFrom & validTo_new >= validTo
-            //        OR validFrom_new < validFrom & validTo_new > validTo
-            // ]
-            if (priceList.validFrom == PriceLists[pricelist].validFrom && priceList.validTo == PriceLists[pricelist].validTo
-                || ! (priceList.validFrom <= PriceLists[pricelist].validFrom && priceList.validTo <= PriceLists[pricelist].validTo
-                       || priceList.validFrom >= PriceLists[pricelist].validFrom && priceList.validTo >= PriceLists[pricelist].validTo
-                       || priceList.validFrom < PriceLists[pricelist].validFrom && priceList.validTo > PriceLists[pricelist].validTo)) {
-                //identical price list found
-                return PriceLists[pricelist];
-            }
-        }
-    }
-
-    //no identical price list found
-    return null;        
-}
-
-/**
- * returns the image for a product
- * 
- * @param {String} pProductId the id of the product.
- * @param {String} pDefaultText the text, to use for default image generation.
- * @return {String} base64 coded String of the image. If none existed, the given String is used to create an image.
- */
-ProductUtils.getImage = function(pProductId, pDefaultText)
-{
-    return ImageUtils.get("PRODUCT", "IMAGE", pProductId, pDefaultText);
-}
-
-/**
- * sets the image of a product
- * 
- * @param {String} pProductId the id of the product.
- * @param {String} pImageDateBase64 base64 coded String of the image.
- * @return {Boolean} if image could be set
- */
-ProductUtils.setImage = function(pProductId, pImageDateBase64)
-{
-    return ImageUtils.set("PRODUCT", "IMAGE", pProductId, pImageDateBase64, "ProductImage", "Image of the product");
-}
-
-/**
- * deletes the image of a product
- * 
- * @param {String} pProductId the id of the product.
- * @return {Boolean} if image could be removed
- */
-ProductUtils.removeImage = function(pProductId)
-{
-    return ImageUtils.remove("PRODUCT", "IMAGE", pProductId);
-}
-
-/**
- * Class containing utility functions for Prod2Prod (Parts list)
- * 
- * @param {String} productId req ProductID
- * 
- * @class
- *
- */
-function Prod2ProdUtils(productId) {    
-    this.productId = productId;
-    this.data = undefined;
-}
-
-/**
- * Delivers an Object containing parts list structure for passed product "productId" (Constructor parameter)
- * 
- * @return {Object} { $prod2prodid$ { <br>
- *                       ids: [ Array containing child Prod2ProdIds for passed product "pProductId" (Constructor parameter) ] <br>
- *                       , rowdata: [ "PROD2PRODID", "DEST_ID", "SOURCE_ID", "QUANTITY", "OPTIONAL", "TAKEPRICE" ] from DB-Table PROD2PROD <br>
- *                       , destid: "Parent ProductID" <br>
- *                       , sourceid: "Child ProductID" <br>
- *                       , quantity: "Quantity" <br>
- *                       , optional: "0" = not optional, "1" = optional <br>
- *                       , takeprice: "0" = no price, "1" = price <br>
- *                  } }
- */
-Prod2ProdUtils.prototype.getPartsListObject = function() {
-    return this._relateChilds().getTreeObject();
-}
-
-/**
- * Delivers a 2D-Array for RecordContainer of Entity "Prod2prod_entity" 
- * containing parts list for passed product "productId" (Constructor parameter).
- * 
- * It is necessary to generate a specifically UID for the RecordContainer because 
- * the same data record can be listed several times. Therefore the primary key "PROD2PRODID"
- * can not be used for UID because this must be unique.
- * 
- * @return {String[][]} [ ["UID"
- *                    , "PARENTID" (equals "DEST_ID")
- *                    , "PROD2PRODID"
- *                    , "DEST_ID"
- *                    , "SOURCE_ID"
- *                    , "QUANTITY"
- *                    , "OPTIONAL"
- *                    , "TAKEPRICE"
- *                    , "PRODUCTCODE"] ]
- */
-Prod2ProdUtils.prototype.getPartsListForRecordContainer = function() {
-    var tree = this._relateChilds();
-    return tree.toArray(7);
-//    var ret = [];
-//    var childs = this._relateChilds();
-//    
-//    // map internal, (uids used in this function) concatenated ids to new random generated uuids. 
-//    // Without this every depth would make the uid significantly longer.
-//    var uidMap = {};
-//    
-//    __push("", childs.root, 0);
-//    
-//
-//    
-//    
-//    function __push(parent, obj) {
-//        logging.log(obj.toSource())
-//        //
-//        
-//        for (var i = 0; i < obj.ids.length; i++) {
-//            logging.log(childs[obj.ids[i]].toSource())
-//            var nextUid = parent + obj.ids[i];
-//            __addRow(nextUid, parent, childs[obj.ids[i]].rowdata)
-//           
-//            __push(nextUid, childs[obj.ids[i]])
-//        }
-//    }
-//    
-//    function __addRow(uid, parentId, rowdata)
-//    {
-//        uidMap[uid] = util.getNewUUID();
-//        if (uidMap[parentId] == undefined) {
-//            uidMap[parentId] = util.getNewUUID();
-//        }
-//        
-//        ret.push([uidMap[uid], uidMap[parentId]].concat(rowdata));
-//    }
-//    
-//    return ret;
-}
-
-/**
-* Delivers an Array containing productids of the parts list 
-* for passed product "productId" (Constructor parameter).
-* 
-* 
-* @return {String[]} [ "SOURCE_ID" ]
-*/
-Prod2ProdUtils.prototype.getPartsListProdIds = function() {
-    var ret = [];
-    var childs = this._relateChilds().getTreeObject();
-
-    __push(childs.root);
-
-    return ret;
-
-    function __push(pObj) {
-        for (var i = 0; i < pObj.ids.length; i++) {
-            ret.push(childs[pObj.ids[i]].sourceid);
-            __push(childs[pObj.ids[i]]);
-        }
-    }
-}
-
-/**
-* Delivers an Array containing productids of the parent list
-* for passed product "productId" (Constructor parameter).
-* 
-* 
-* @return {String[]} [ "DEST_ID" ]
-*/
-Prod2ProdUtils.prototype.getParentProdIds = function() {
-    var ret = [];
-    var parents = this._relateParents();
-
-    __push(parents.root);
-
-    return ret;
-
-    function __push(pObj) {
-        for (var i = 0; i < pObj.ids.length; i++) {
-            ret.push(parents[pObj.ids[i]].destid);
-            __push(parents[pObj.ids[i]]);
-        }
-    }
-}
-
-/** 
-* Function to initalize class variable "data" containing complete Prod2Prod-Data.<br>
-* It guarantees a unique load of data per instance.
-*
-* @ignore
-*/
-Prod2ProdUtils.prototype._initProd2ProdData = function() {
-    if (this.data == undefined) {
-        this.data = db.table("select SOURCE_ID, DEST_ID, PROD2PRODID, QUANTITY, OPTIONAL, TAKEPRICE, PRODUCTCODE, SOURCE_ID, DEST_ID "
-                    + "from PROD2PROD join PRODUCT on PROD2PROD.SOURCE_ID = PRODUCTID "
-                    + "order by PRODUCTCODE ");
-    }
-}
-
-/* object tree to relate products by DEST_ID / SOURCE_ID.
- * 
- **/
-Prod2ProdUtils.prototype._buildTree = function(supervised) {
-    this._initProd2ProdData();
-    var productId = this.productId;
-    
-    var tree = DataTree.begin(this.productId).addArray(this.data,
-        function(pUid, pNode)
-        {
-            if (pUid == productId)
-            {
-                pNode["sourceid"] = productId;
-                if (supervised) 
-                {
-                    pNode["destid"] = productId;
-                }
-            } 
-            else
-            {
-                pNode["destid"] = pNode.parent;
-                pNode["sourceid"] = pUid;
-                
-                if (pNode.data != undefined) {
-                    pNode["quantity"] = pNode.data[1];
-                    pNode["optional"] = pNode.data[2];
-                    pNode["takeprice"] = pNode.data[3];
-                    pNode["productcode"] = pNode.data[4];
-                }
-            }
-        }
-    );
-    /*
-
-    var tree = { root: {ids: [], sourceid: this.productId } };
-
-    if (supervised)
-        tree = { root: {ids: [], destid: this.productId } };
-
-    for (var i = 0; i < this.data.length; i++) {
-        var prod2prodid = this.data[i][0];
-        if (tree[prod2prodid] == undefined) {
-            tree[prod2prodid] = {
-                ids: [] 
-                , rowdata: this.data[i].slice(0)//copy to get NativeArray for concatenation
-                , destid: this.data[i][1]
-                , sourceid: this.data[i][2] 
-                , quantity: this.data[i][3]
-                , optional: this.data[i][4]
-                , takeprice: this.data[i][5]
-                , productcode: this.data[i][6]
-            };
-        }
-    }
-*/
-    return tree;
-}
-
-Prod2ProdUtils.prototype._relateChilds = function() {
-    var tree = this._buildTree(false);
-    __relate(this.productId);
-
-    return tree;
-
-    function __relate(id) {
-        var treeObject = tree.getTreeObject();
-        for (var treeId in treeObject) {
-            if (treeObject[treeId].destid == treeObject[id].sourceid && treeObject[id].ids.indexOf(treeId) == -1) { 
-                treeObject[id].ids.push(treeId);
-                __relate(treeId);
-            }    
-        }
-    }
-}
-/*
-Prod2ProdUtils.prototype._relateChilds = function() {
-    var tree = this._buildTree(false);
-    logging.log(tree.toSource())
-    
-    __relate("root");
-    
-    logging.log(tree.toSource())
-
-    return tree;
-
-
-    function __relate(id) {
-        for (var treeId in tree) {
-            if (tree[treeId].destid == tree[id].sourceid && tree[id].ids.indexOf(treeId) == -1) {   
-                tree[id].ids.push(treeId);
-                __relate(treeId);
-            }    
-        }
-    }
-}
-*/
-Prod2ProdUtils.prototype._relateParents = function() {
-    var tree = this._buildTree(true);
-
-    __relate(this.productId);
-
-    return tree;
-
-
-    function __relate(id) {
-        var treeObject = tree.getTreeObject();
-        for (var treeId in treeObject) {
-            if (treeObject[treeId].sourceid == treeObject[id].destid && treeObject[id].ids.indexOf(treeId) == -1) {   
-                treeObject[id].ids.push(treeId);
-                __relate(treeId);
-            }    
-        }
-    }
+import("system.util");
+import("system.SQLTYPES");
+import("system.datetime");
+import("system.db");
+import("system.vars");
+import("system.translate");
+import("Util_lib");
+import("Binary_lib");
+import("Sql_lib");
+import("Keyword_lib");
+import("Data_lib");
+
+/**
+ * utility functions for products
+ * Do not create an instance of this!
+ * 
+ * @class
+ */
+function ProductUtils() {}
+
+/**
+ * Delivers the currently valid product price 
+ * 
+ * @param {String} pid ProductID
+ * @param {String} buySell possible values: PP, SP
+ * 
+ * @example productUtils.getCurrentProductPrice(vars.get("$field.PRODUCTID"), "PP")
+ * 
+ * @return {String} currently valid product price
+ */
+ProductUtils.getCurrentProductPrice = function(pid, buySell) {
+    if (pid != undefined && pid != "" && buySell != undefined && buySell != "")
+    {
+        var today = datetime.clearTime(vars.get("sys.date"), "utc");
+        var actualPriceCondition = SqlCondition.begin()
+                    .andPrepare("PRODUCTPRICE.BUYSELL", buySell)
+                    .andPrepare("PRODUCTPRICE.PRODUCT_ID", pid)
+                    .andPrepare("PRODUCTPRICE.CURRENCY", 1) // TODO: warum ist Currency hardgecoded auf 1??
+                    .andPrepare("PRODUCTPRICE.VALID_FROM", today, "# <= ?")
+                    .andSqlCondition(SqlCondition.begin()
+                        .orPrepare("PRODUCTPRICE.VALID_TO", today, "# >= ?")
+                        .or("PRODUCTPRICE.VALID_TO is null"), "1 = 2");
+                            
+        var productPriceData = db.array(db.ROW, actualPriceCondition.buildSql("select PRICE, CURRENCY from PRODUCTPRICE", "1 = 2", "order by VALID_FROM desc"));
+        
+        if (productPriceData[0] && productPriceData[1])
+            return  productPriceData[0] + " " + KeywordUtils.get("CURRENCY", productPriceData[1])[1];
+        else
+            return "";
+    } else {
+        throw new Error(); // TODO: add message
+    }
+}
+
+/**
+ * Delivers the stock
+ * 
+ * @param {String} pid ProductID
+ * 
+ * @example productUtils.getStockCount(vars.get("$field.PRODUCTID"))
+ * 
+ * @return {String} stock count
+ */
+ProductUtils.getStockCount = function(pid) {
+    if (pid != undefined && pid != "")
+    {
+        var sum = db.cell(SqlCondition.begin()
+                                      .andPrepare("STOCK.PRODUCT_ID", pid)
+                                      .buildSql("select sum(QUANTITY * case IN_OUT when 0 then -1 else 1)"
+                                                 + " from STOCK"));
+        
+        if (sum == "")
+            sum = "0";
+
+        return sum;
+    }
+    else
+    {
+        throw new Error();//TODO: add message
+    }
+}
+
+/**
+ * Delivers metadata and price lists of the passed product. 
+ * If parameter "priceListFilter" is passed valid price lists and the 
+ * current price list to use for offer/order are delivered.
+ * 
+ * @param {String} pid req ProductID
+ * @param {Object} priceListFilter opt { currency: "currencyValue", quantity: "quantityValue", relationId: "relationIdValue (for custom price lists)" }
+ * @param {String[]} additionalProductInfoFields additional fields from Product
+ *                   They are added to the result with the Fieldname as key. e.g. if the array is ["INFO"] the result will contain the key "INFO"
+ * 
+ * @example //Product_entity, Field: PRODUCT_ID, Process: onValueChange
+ *          var pid = ProcessHandlingUtils.getOnValidationValue(vars.get("$field.PRODUCT_ID"));
+ *          var curr = vars.exists("$param.Currency_param") ? vars.get("$param.Currency_param") : "";
+ *          var relid = vars.exists("$param.RelationId_param") ? vars.get("$param.RelationId_param") : "";
+ *          var pUtils = new ProductUtils();
+ *          var PriceListFilter = { currency: curr, quantity: vars.get("$field.QUANTITY"), relationId: relid };
+ *          var ProductDetails = pUtils.getProductDetails(pid, PriceListFilter, ["INFO"]);
+ * 
+ * @return {Object} { <br>
+ *                   productId: "productid" <br>
+ *                   , productName: "product name" <br>
+ *                   , groupCode: "keyvalue of keyword 'GROUPCODE'" <br>
+ *                   , unit: "keyvalue of keyword 'UNIT'" <br>
+ *                   , PriceLists: {$pricelistid$ { <br>
+ *                          priceListId: "pricelistid" <br>
+ *                          , relationId: "relationid" when filled -> custom price list <br>
+ *                          , priceList: "keyvalue of keyword 'PRICELIST'" <br>
+ *                          , price: "price" <br>
+ *                          , vat: "vat" <br>
+ *                          , validFrom: TIMESTAMP <br>
+ *                          , validTo: TIMESTAMP <br>
+ *                          , buySell: "SP" / "PP" <br>
+ *                          , fromQuantity: "fromquantity" <br>
+ *                          , currency: "keyvalue of keyword 'CURRENCY'" <br>
+ *                      } } <br>
+ *                   , CurrentValidPriceLists: {$pricelistid$ { <br>
+ *                          priceListId: "pricelistid" <br>
+ *                          , relationId: "relationid" when filled -> custom price list <br>
+ *                          , priceList: "keyvalue of keyword 'PRICELIST'" <br>
+ *                          , price: "price" <br>
+ *                          , vat: "vat" <br>
+ *                          , validFrom: TIMESTAMP <br>
+ *                          , validTo: TIMESTAMP <br>
+ *                          , buySell: "SP" / "PP" <br>
+ *                          , fromQuantity: "fromquantity" <br>
+ *                          , currency: "keyvalue of keyword 'CURRENCY'" <br>
+ *                      } } <br>
+ *                   , PriceListToUse: {$pricelistid$ { <br>
+ *                          priceListId: "pricelistid" <br>
+ *                          , relationId: "relationid" when filled -> custom price list <br>
+ *                          , priceList: "keyvalue of keyword 'PRICELIST'" <br>
+ *                          , price: "price" <br>
+ *                          , vat: "vat" <br>
+ *                          , validFrom: TIMESTAMP <br>
+ *                          , validTo: TIMESTAMP <br>
+ *                          , buySell: "SP" / "PP" <br>
+ *                          , fromQuantity: "fromquantity" <br>
+ *                          , currency: "keyvalue of keyword 'CURRENCY'" <br>
+ *                      } }, <br>
+ *                   INFO: "the productinfo"
+ *               }
+ */
+ProductUtils.getProductDetails = function(pid, priceListFilter, additionalProductInfoFields)
+{
+    if (additionalProductInfoFields == undefined) {additionalProductInfoFields = []}
+    var ProductDetails = {};
+
+    var cols = [];
+    var colsProduct = ["PRODUCT.PRODUCTID", "PRODUCT.PRODUCTNAME", "PRODUCT.GROUPCODEID", "PRODUCT.UNIT"];
+    var defaultProductFieldCount = colsProduct.length;
+    colsProduct = colsProduct.concat(additionalProductInfoFields.map(function(item) {return "PRODUCT." + item}));
+    
+    cols = cols.concat(colsProduct);
+
+    var joins = [];
+    var orderby = ["PRODUCTID"];
+
+    //PriceList (all)
+    var colsPricelistAll = ["allPP.PRODUCTPRICEID", "allPP.RELATION_ID", "allPP.PRICELIST", "allPP.PRICE", "allPP.VAT"
+                        , "allPP.VALID_FROM", "allPP.VALID_TO", "allPP.BUYSELL", "allPP.FROMQUANTITY", "allPP.CURRENCY"];
+
+    cols = cols.concat(colsPricelistAll);
+    joins.push(" left join PRODUCTPRICE allPP on allPP.PRODUCT_ID = PRODUCTID ");
+
+    //PriceList (currently valid)
+    var validPriceLists = false;
+    if (priceListFilter != undefined 
+        && priceListFilter.currency != undefined && priceListFilter.currency != "" 
+        && priceListFilter.quantity != undefined && priceListFilter.quantity != "")
+    {
+        validPriceLists = true;
+        var colsPricelistValid = ["validPP.PRODUCTPRICEID", "validPP.RELATION_ID", "validPP.PRICELIST", "validPP.PRICE", "validPP.VAT"
+                        , "validPP.VALID_FROM", "validPP.VALID_TO", "validPP.BUYSELL", "validPP.FROMQUANTITY", "validPP.CURRENCY"];
+
+        cols = cols.concat(colsPricelistValid);
+        joins.push("left join PRODUCTPRICE validPP on " 
+                    + db.translateCondition(SqlCondition.begin()
+                               .and("validPP.PRODUCT_ID = PRODUCTID")
+                               .andPrepare(["PRODUCTPRICE", "CURRENCY", "validPP"], priceListFilter.currency)
+                               .andPrepare(["PRODUCTPRICE", "VALID_FROM", "validPP"], datetime.date().toString(), "# <= ?")
+                               .andPrepare(["PRODUCTPRICE", "FROMQUANTITY", "validPP"], priceListFilter.quantity, "# <= ?")
+                               .andSqlCondition(SqlCondition.begin()
+                                    .orPrepare(["PRODUCTPRICE", "RELATION_ID", "validPP"], priceListFilter.relationId, "# <= ?")
+                                    .orSqlCondition(SqlCondition.begin()
+                                        .and("validPP.RELATION_ID is null")
+                                        .andPrepare(["PRODUCTPRICE", "BUYSELL", "validPP"], 'SP'), 
+                                    "1 = 2"), 
+                                "1 = 2")
+                                .build("1 = 2")))
+    }
+    
+    var ProductDataSql = SqlCondition.begin()
+                            .andPrepare("PRODUCT.PRODUCTID", pid)
+                            .buildSql("select " + cols.join(", ") + " from PRODUCT " + joins.join(" "),
+                                         "1 = 2",
+                                         "order by " + orderby.join(", "))
+
+    var ProductData = db.table(ProductDataSql);
+
+    for (var i = 0; i < ProductData.length; i++)
+    {
+        //Product
+        if (ProductDetails.productId == undefined)
+        {
+            ProductDetails = {
+                            productId: ProductData[i][0]
+                            , productName: ProductData[i][1]
+                            , groupCode: ProductData[i][2]
+                            , unit: ProductData[i][3]
+                            , PriceLists: {}
+                            , CurrentValidPriceLists: {}
+                            , PriceListToUse: null
+                        };
+                        
+            // add additional fields to the details
+            var countPos = defaultProductFieldCount;
+            additionalProductInfoFields.forEach(function(productField)
+            {
+                this[productField] = ProductData[i][countPos];
+                countPos++;
+            }, ProductDetails);
+        }
+        //Pricelist (all)
+        var colIdx = colsProduct.length;
+        if (ProductData[i][colIdx] != "" && ProductDetails.PriceLists[ProductData[i][colIdx]] == undefined) //Pricelist found
+        {
+            ProductDetails.PriceLists[ProductData[i][colIdx]] = _getPriceListObject();
+        }
+
+        //Pricelist (currently valid)
+        colIdx = colsProduct.length + colsPricelistAll.length;
+        if (validPriceLists)
+        {
+            if (ProductData[i][colIdx] != "" && ProductDetails.CurrentValidPriceLists[ProductData[i][colIdx]] == undefined) //Pricelist found
+            {
+                ProductDetails.CurrentValidPriceLists[ProductData[i][colIdx]] = _getPriceListObject();
+            }
+        }
+    }
+
+    if (validPriceLists)
+        ProductDetails.PriceListToUse = _getPriceListToUse(ProductDetails.CurrentValidPriceLists, priceListFilter);
+
+    return ProductDetails;
+
+    function _getPriceListObject() {
+        return {
+                priceListId: ProductData[i][colIdx++]
+                , relationId: ProductData[i][colIdx++]
+                , priceList: ProductData[i][colIdx++]
+                , price: ProductData[i][colIdx++]
+                , vat: ProductData[i][colIdx++]
+                , validFrom: ProductData[i][colIdx++]
+                , validTo: ProductData[i][colIdx++]
+                , buySell: ProductData[i][colIdx++]
+                , fromQuantity: ProductData[i][colIdx++]
+                , currency: ProductData[i][colIdx++]
+        };
+    }
+
+    //price list to use for offer/order
+    function _getPriceListToUse(priceLists, priceListFilter) {
+        for (var list in priceLists) {
+            //custom price (defined in Org -> Conditions)
+            if (priceListFilter.relationId != "" && priceListFilter.relationId == priceLists[list].relationId) {
+                return priceLists[list];
+            }
+            //customer deposited price list (defined by Attribute)
+            if (priceListFilter.priceList != "" && priceListFilter.priceList == priceLists[list].priceList) {
+                return priceLists[list];
+            }
+            //default price list
+            if (priceLists[list].priceList == "1") {
+                return priceLists[list];
+            }
+        }
+
+        //no valid price list found
+        return null;
+    }
+}
+
+/**
+ * Checks if there is already an existing price list identical to the passed price list 
+ * 
+ * @param {String} pid ProductID
+ * @param {Object} priceList { <br>
+ *                                  priceList: "keyvalue of keyword 'PRICELIST'" <br>
+ *                                  , validFrom: TIMESTAMP <br>
+ *                                  , validTo: TIMESTAMP <br>
+ *                                  , buySell: "SP" / "PP" <br>
+ *                                  , fromQuantity: "fromquantity" <br>
+ *                                  , currency: "keyvalue of keyword 'CURRENCY'" <br>
+ *                             }
+ * 
+ * @example //Productprice_entity, Field: PRICELIST, Process: onValidation
+ *          var pUtils = new ProductUtils();
+ *          var priceList = {
+ *                          priceList: ProcessHandlingUtils.getOnValidationValue(vars.get("$field.PRICELIST"))
+ *                          , fromQuantity: vars.get("$field.FROMQUANTITY")
+ *                          , buySell: vars.get("$field.BUYSELL")
+ *                          , currency: vars.get("$field.CURRENCY")
+ *                          , validFrom: vars.get("$field.VALID_FROM")
+ *                          , validTo: vars.get("$field.VALID_TO")
+ *                      };
+ *
+ *          var identicalPriceList = pUtils.checkForIndenticalPriceLists(vars.get("$field.PRODUCT_ID"), priceList);
+ *          if (identicalPriceList != null)
+ *          {
+ *              result.string(translate.text("Identical price list found!"));
+ *          }
+ * 
+ * @return {Object | null} null if no identical price list was found, otherwise the found price list
+ */
+ProductUtils.checkForIndenticalPriceLists = function(pid, priceList) {
+    var PriceLists = this.getProductDetails(pid).PriceLists;
+
+    for (var pricelist in PriceLists) {
+        //equal price list
+        //equal fromquantity
+        //equal currency
+        //equal pp/sp
+        if (priceList.priceList == PriceLists[pricelist].priceList 
+            && priceList.fromQuantity == PriceLists[pricelist].fromQuantity 
+            && priceList.buySell == PriceLists[pricelist].buySell
+            && priceList.currency == PriceLists[pricelist].currency) {
+            
+            //identical validFrom & validTo
+            // OR NOT [ validFrom_new <= validFrom & validTo_new <= validTo
+            //        OR validFrom_new >= validFrom & validTo_new >= validTo
+            //        OR validFrom_new < validFrom & validTo_new > validTo
+            // ]
+            if (priceList.validFrom == PriceLists[pricelist].validFrom && priceList.validTo == PriceLists[pricelist].validTo
+                || ! (priceList.validFrom <= PriceLists[pricelist].validFrom && priceList.validTo <= PriceLists[pricelist].validTo
+                       || priceList.validFrom >= PriceLists[pricelist].validFrom && priceList.validTo >= PriceLists[pricelist].validTo
+                       || priceList.validFrom < PriceLists[pricelist].validFrom && priceList.validTo > PriceLists[pricelist].validTo)) {
+                //identical price list found
+                return PriceLists[pricelist];
+            }
+        }
+    }
+
+    //no identical price list found
+    return null;        
+}
+
+/**
+ * returns the image for a product
+ * 
+ * @param {String} pProductId the id of the product.
+ * @param {String} pDefaultText the text, to use for default image generation.
+ * @return {String} base64 coded String of the image. If none existed, the given String is used to create an image.
+ */
+ProductUtils.getImage = function(pProductId, pDefaultText)
+{
+    return ImageUtils.get("PRODUCT", "IMAGE", pProductId, pDefaultText);
+}
+
+/**
+ * sets the image of a product
+ * 
+ * @param {String} pProductId the id of the product.
+ * @param {String} pImageDateBase64 base64 coded String of the image.
+ * @return {Boolean} if image could be set
+ */
+ProductUtils.setImage = function(pProductId, pImageDateBase64)
+{
+    return ImageUtils.set("PRODUCT", "IMAGE", pProductId, pImageDateBase64, "ProductImage", "Image of the product");
+}
+
+/**
+ * deletes the image of a product
+ * 
+ * @param {String} pProductId the id of the product.
+ * @return {Boolean} if image could be removed
+ */
+ProductUtils.removeImage = function(pProductId)
+{
+    return ImageUtils.remove("PRODUCT", "IMAGE", pProductId);
+}
+
+/**
+ * Class containing utility functions for Prod2Prod (Parts list)
+ * 
+ * @param {String} productId req ProductID
+ * 
+ * @class
+ *
+ */
+function Prod2ProdUtils(productId) {    
+    this.productId = productId;
+    this.data = undefined;
+}
+
+/**
+ * Delivers an Object containing parts list structure for passed product "productId" (Constructor parameter)
+ * 
+ * @return {Object} { $prod2prodid$ { <br>
+ *                       ids: [ Array containing child Prod2ProdIds for passed product "pProductId" (Constructor parameter) ] <br>
+ *                       , rowdata: [ "PROD2PRODID", "DEST_ID", "SOURCE_ID", "QUANTITY", "OPTIONAL", "TAKEPRICE" ] from DB-Table PROD2PROD <br>
+ *                       , destid: "Parent ProductID" <br>
+ *                       , sourceid: "Child ProductID" <br>
+ *                       , quantity: "Quantity" <br>
+ *                       , optional: "0" = not optional, "1" = optional <br>
+ *                       , takeprice: "0" = no price, "1" = price <br>
+ *                  } }
+ */
+Prod2ProdUtils.prototype.getPartsListObject = function() {
+    return this._relateChilds().getTreeObject();
+}
+
+/**
+ * Delivers a 2D-Array for RecordContainer of Entity "Prod2prod_entity" 
+ * containing parts list for passed product "productId" (Constructor parameter).
+ * 
+ * It is necessary to generate a specifically UID for the RecordContainer because 
+ * the same data record can be listed several times. Therefore the primary key "PROD2PRODID"
+ * can not be used for UID because this must be unique.
+ * 
+ * @return {String[][]} [ ["UID"
+ *                    , "PARENTID" (equals "DEST_ID")
+ *                    , "PROD2PRODID"
+ *                    , "DEST_ID"
+ *                    , "SOURCE_ID"
+ *                    , "QUANTITY"
+ *                    , "OPTIONAL"
+ *                    , "TAKEPRICE"
+ *                    , "PRODUCTCODE"] ]
+ */
+Prod2ProdUtils.prototype.getPartsListForRecordContainer = function() {
+    var tree = this._relateChilds();
+    return tree.toArray(7);
+//    var ret = [];
+//    var childs = this._relateChilds();
+//    
+//    // map internal, (uids used in this function) concatenated ids to new random generated uuids. 
+//    // Without this every depth would make the uid significantly longer.
+//    var uidMap = {};
+//    
+//    __push("", childs.root, 0);
+//    
+//
+//    
+//    
+//    function __push(parent, obj) {
+//        logging.log(obj.toSource())
+//        //
+//        
+//        for (var i = 0; i < obj.ids.length; i++) {
+//            logging.log(childs[obj.ids[i]].toSource())
+//            var nextUid = parent + obj.ids[i];
+//            __addRow(nextUid, parent, childs[obj.ids[i]].rowdata)
+//           
+//            __push(nextUid, childs[obj.ids[i]])
+//        }
+//    }
+//    
+//    function __addRow(uid, parentId, rowdata)
+//    {
+//        uidMap[uid] = util.getNewUUID();
+//        if (uidMap[parentId] == undefined) {
+//            uidMap[parentId] = util.getNewUUID();
+//        }
+//        
+//        ret.push([uidMap[uid], uidMap[parentId]].concat(rowdata));
+//    }
+//    
+//    return ret;
+}
+
+/**
+* Delivers an Array containing productids of the parts list 
+* for passed product "productId" (Constructor parameter).
+* 
+* 
+* @return {String[]} [ "SOURCE_ID" ]
+*/
+Prod2ProdUtils.prototype.getPartsListProdIds = function() {
+    var ret = [];
+    var childs = this._relateChilds().getTreeObject();
+
+    __push(childs.root);
+
+    return ret;
+
+    function __push(pObj) {
+        for (var i = 0; i < pObj.ids.length; i++) {
+            ret.push(childs[pObj.ids[i]].sourceid);
+            __push(childs[pObj.ids[i]]);
+        }
+    }
+}
+
+/**
+* Delivers an Array containing productids of the parent list
+* for passed product "productId" (Constructor parameter).
+* 
+* 
+* @return {String[]} [ "DEST_ID" ]
+*/
+Prod2ProdUtils.prototype.getParentProdIds = function() {
+    var ret = [];
+    var parents = this._relateParents();
+
+    __push(parents.root);
+
+    return ret;
+
+    function __push(pObj) {
+        for (var i = 0; i < pObj.ids.length; i++) {
+            ret.push(parents[pObj.ids[i]].destid);
+            __push(parents[pObj.ids[i]]);
+        }
+    }
+}
+
+/** 
+* Function to initalize class variable "data" containing complete Prod2Prod-Data.<br>
+* It guarantees a unique load of data per instance.
+*
+* @ignore
+*/
+Prod2ProdUtils.prototype._initProd2ProdData = function() {
+    if (this.data == undefined) {
+        this.data = db.table("select SOURCE_ID, DEST_ID, PROD2PRODID, QUANTITY, OPTIONAL, TAKEPRICE, PRODUCTCODE, SOURCE_ID, DEST_ID "
+                    + "from PROD2PROD join PRODUCT on PROD2PROD.SOURCE_ID = PRODUCTID "
+                    + "order by PRODUCTCODE ");
+    }
+}
+
+/* object tree to relate products by DEST_ID / SOURCE_ID.
+ * 
+ **/
+Prod2ProdUtils.prototype._buildTree = function(supervised) {
+    this._initProd2ProdData();
+    var productId = this.productId;
+    
+    var tree = DataTree.begin(this.productId).addArray(this.data,
+        function(pUid, pNode)
+        {
+            if (pUid == productId)
+            {
+                pNode["sourceid"] = productId;
+                if (supervised) 
+                {
+                    pNode["destid"] = productId;
+                }
+            } 
+            else
+            {
+                pNode["destid"] = pNode.parent;
+                pNode["sourceid"] = pUid;
+                
+                if (pNode.data != undefined) {
+                    pNode["quantity"] = pNode.data[1];
+                    pNode["optional"] = pNode.data[2];
+                    pNode["takeprice"] = pNode.data[3];
+                    pNode["productcode"] = pNode.data[4];
+                }
+            }
+        }
+    );
+    /*
+
+    var tree = { root: {ids: [], sourceid: this.productId } };
+
+    if (supervised)
+        tree = { root: {ids: [], destid: this.productId } };
+
+    for (var i = 0; i < this.data.length; i++) {
+        var prod2prodid = this.data[i][0];
+        if (tree[prod2prodid] == undefined) {
+            tree[prod2prodid] = {
+                ids: [] 
+                , rowdata: this.data[i].slice(0)//copy to get NativeArray for concatenation
+                , destid: this.data[i][1]
+                , sourceid: this.data[i][2] 
+                , quantity: this.data[i][3]
+                , optional: this.data[i][4]
+                , takeprice: this.data[i][5]
+                , productcode: this.data[i][6]
+            };
+        }
+    }
+*/
+    return tree;
+}
+
+Prod2ProdUtils.prototype._relateChilds = function() {
+    var tree = this._buildTree(false);
+    __relate(this.productId);
+
+    return tree;
+
+    function __relate(id) {
+        var treeObject = tree.getTreeObject();
+        for (var treeId in treeObject) {
+            if (treeObject[treeId].destid == treeObject[id].sourceid && treeObject[id].ids.indexOf(treeId) == -1) { 
+                treeObject[id].ids.push(treeId);
+                __relate(treeId);
+            }    
+        }
+    }
+}
+/*
+Prod2ProdUtils.prototype._relateChilds = function() {
+    var tree = this._buildTree(false);
+    logging.log(tree.toSource())
+    
+    __relate("root");
+    
+    logging.log(tree.toSource())
+
+    return tree;
+
+
+    function __relate(id) {
+        for (var treeId in tree) {
+            if (tree[treeId].destid == tree[id].sourceid && tree[id].ids.indexOf(treeId) == -1) {   
+                tree[id].ids.push(treeId);
+                __relate(treeId);
+            }    
+        }
+    }
+}
+*/
+Prod2ProdUtils.prototype._relateParents = function() {
+    var tree = this._buildTree(true);
+
+    __relate(this.productId);
+
+    return tree;
+
+
+    function __relate(id) {
+        var treeObject = tree.getTreeObject();
+        for (var treeId in treeObject) {
+            if (treeObject[treeId].sourceid == treeObject[id].destid && treeObject[id].ids.indexOf(treeId) == -1) {   
+                treeObject[id].ids.push(treeId);
+                __relate(treeId);
+            }    
+        }
+    }
 }
\ No newline at end of file
diff --git a/process/Relation_lib/process.js b/process/Relation_lib/process.js
index 1fcb6da82b10ccc39eb639eaa3cdaae63236e6bc..dc3610977d1b5c2f68bca03c6c55b654c9d906a8 100644
--- a/process/Relation_lib/process.js
+++ b/process/Relation_lib/process.js
@@ -139,7 +139,7 @@ RelationUtils.getPersOrgIds = function(pRelationId)
         return db.array(db.ROW, 
             SqlCondition.begin()
                         .andPrepare("RELATION.RELATIONID", pRelationId)
-                        .buildSelect("select RELATIONID, PERS_ID, ORG_ID from RELATION", "1=0"));
+                        .buildSql("select RELATIONID, PERS_ID, ORG_ID from RELATION", "1=0"));
     }
     
     
@@ -197,7 +197,7 @@ RelationUtils.getNameByPersOrgWithRelationId = function(pRelationId, pTitle)
     if (pRelationId) {
         var data = db.array(db.ROW, SqlCondition.begin()
                             .andPrepare("RELATION.RELATIONID", pRelationId)
-                            .buildSelect("select RELATION.PERS_ID, RELATION.ORG_ID, PERS.FIRSTNAME, PERS.LASTNAME, PERS.TITLE, ORG.NAME from RELATION RELATION join ORG on ORG.ORGID = RELATION.ORG_ID left join PERS on PERS.PERSID = RELATION.PERS_ID", "1 = 2"));                                    
+                            .buildSql("select RELATION.PERS_ID, RELATION.ORG_ID, PERS.FIRSTNAME, PERS.LASTNAME, PERS.TITLE, ORG.NAME from RELATION RELATION join ORG on ORG.ORGID = RELATION.ORG_ID left join PERS on PERS.PERSID = RELATION.PERS_ID", "1 = 2"));                                    
  
         return RelationUtils.getNameByPersOrg(data[0], data[1], data[2], data[3], data[5], (pTitle ? data[4] : undefined));
     }
diff --git a/process/Salesproject_lib/process.js b/process/Salesproject_lib/process.js
index 145b3b6bdbfd670925f65b9f203b41939e1aa7d1..9d534dd841e643208fdc15c0ddefadafe7b74dca 100644
--- a/process/Salesproject_lib/process.js
+++ b/process/Salesproject_lib/process.js
@@ -80,5 +80,5 @@ Salesproject.getSalesProjectTitleById = function(pSalesProjectId)
 {
     return db.cell( SqlCondition.begin()
                         .andPrepare("SALESPROJECT.SALESPROJECTID", pSalesProjectId)
-                        .buildSelect("select PROJECTTITLE from SALESPROJECT", "1=0"));
+                        .buildSql("select PROJECTTITLE from SALESPROJECT", "1=0"));
 }
\ No newline at end of file
diff --git a/process/Sql_lib/process.js b/process/Sql_lib/process.js
index 41a63250c9604e51983201630073f57980284b92..da37e649374a882de7479bb427a8078a1e9cad0d 100644
--- a/process/Sql_lib/process.js
+++ b/process/Sql_lib/process.js
@@ -48,12 +48,12 @@ function SqlCondition(alias) {
  *                                              .or("NAME = 'Max'")
  *                                              .or("NAME = 'Bob'")
  *                              )
- *                             .buildSelect("select * from MYTABLE");
+ *                             .buildSql("select * from MYTABLE");
  *                             
  * // Or use it for simple selects:
  * var sum = db.cell(SqlCondition.begin()
  *                               .andPrepared("STOCK.PRODUCT_ID", pid)
- *                               .buildSelect("select sum(QUANTITY * IN_OUT) from STOCK"));
+ *                               .buildSql("select sum(QUANTITY * IN_OUT) from STOCK"));
  */
 SqlCondition.begin = function(alias) {
     return new SqlCondition(alias);
@@ -244,15 +244,22 @@ SqlCondition.prototype.build = function(alternativeCond) {
 
 /**
  * ready to use prepared select
- * @param {String} beforeCondition Part of the sql before the condition without where (e.g. "select FIRSTNAME from PERS")
- * @param {String} [alternativeCond=""] Condition that is returned when nothing has been appended.
- * @param {String} [afterCondition=""] Part of the sql after the condition (e.g. "order by FIRSTNAME").
+ * @param {String} pBeforeCondition Part of the sql before the condition without where (e.g. "select FIRSTNAME from PERS")
+ * @param {String} [pAlternativeCond=""] Condition that is returned when nothing has been appended.
+ * @param {String} [pAfterCondition=""] Part of the sql after the condition (e.g. "order by FIRSTNAME").
+ * @param {Boolean} [pWithWere=true] true if where should be added to the bginning
  * @return {Array[][][]} Prepared condition with [condition, [[field1, type1], [field2, type2]]]
  */
-SqlCondition.prototype.buildSelect = function(beforeCondition, alternativeCond, afterCondition) {
-    if (afterCondition == undefined)
-        afterCondition = "" 
-    return [beforeCondition  + " " + this.toWhereString(alternativeCond) + " " + afterCondition, this.preparedValues];
+SqlCondition.prototype.buildSql = function(pBeforeCondition, pAlternativeCond, pAfterCondition, pWithWere) {
+    if (pAfterCondition == undefined)
+        pAfterCondition = "";
+    
+    if (pWithWere == undefined) 
+        pWithWere = true;
+    
+    return [pBeforeCondition  + " " + 
+            (pWithWere ? this.toWhereString(pAlternativeCond) : this.toString(pAlternativeCond)) +
+            " " + pAfterCondition, this.preparedValues];
 }
 
 /**