diff --git a/entity/ObjectRelation_entity/entityfields/selectedobjectrelationtypeidproxy/possibleItemsProcess.js b/entity/ObjectRelation_entity/entityfields/selectedobjectrelationtypeidproxy/possibleItemsProcess.js
index 6a50b40e6edb73828ddc114540c1f58f8b85627c..41ddaad8d5dc1f6a137232492c62683cab4da7e0 100644
--- a/entity/ObjectRelation_entity/entityfields/selectedobjectrelationtypeidproxy/possibleItemsProcess.js
+++ b/entity/ObjectRelation_entity/entityfields/selectedobjectrelationtypeidproxy/possibleItemsProcess.js
@@ -7,10 +7,9 @@ result.object(db.table(
 ["select main.AB_OBJECTRELATIONTYPEID, main.RELATION_TITLE \n\
     from AB_OBJECTRELATIONTYPE main \n\
     left join AB_OBJECTRELATIONTYPE type2 on (type2.AB_OBJECTRELATIONTYPEID <> main.AB_OBJECTRELATIONTYPEID and type2.RELATION_TYPE = main.RELATION_TYPE) \n\
-    where case when type2.OBJECT_TYPE is null then ( ? = main.OBJECT_TYPE) else ( ? = type2.OBJECT_TYPE) end"
+    where case when type2.OBJECT_TYPE is null then main.OBJECT_TYPE else type2.OBJECT_TYPE end = ? "
 , [
-  [vars.get("$param.ObjectType_param"), db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]],
-  [vars.get("$param.ObjectType_param"), db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]],
+  [vars.get("$param.ObjectType_param"), db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]]
 ]]).map(function(pItem) 
 {
     return [pItem[0], translate.text(pItem[1])];
diff --git a/process/ObjectRelation_lib/process.js b/process/ObjectRelation_lib/process.js
index a3d375d5c3642ad0f4a71dd9c437dbe30b977fa8..2457c50902f40a5b2d825590ec84b01105e2e5cb 100644
--- a/process/ObjectRelation_lib/process.js
+++ b/process/ObjectRelation_lib/process.js
@@ -22,7 +22,7 @@ ObjectRelationUtils.getPossibleRelationTypes = function(pObjectType, pFullInfo)
 {
     var sql = " from AB_OBJECTRELATIONTYPE main \n\
             left join AB_OBJECTRELATIONTYPE type2 on (type2.AB_OBJECTRELATIONTYPEID <> main.AB_OBJECTRELATIONTYPEID and type2.RELATION_TYPE = main.RELATION_TYPE) \n\
-            where case when type2.OBJECT_TYPE is null then ( ? = main.OBJECT_TYPE) else ( ? = type2.OBJECT_TYPE) end"
+            where case when type2.OBJECT_TYPE is null then main.OBJECT_TYPE else type2.OBJECT_TYPE end = ? "
     
     // only id and title:
     if (pFullInfo == undefined || pFullInfo == false)
@@ -32,8 +32,7 @@ ObjectRelationUtils.getPossibleRelationTypes = function(pObjectType, pFullInfo)
         return (db.table(
         ["select main.AB_OBJECTRELATIONTYPEID, main.RELATION_TITLE" + sql, 
             [
-              [pObjectType, db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]],
-              [pObjectType, db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]],
+              [pObjectType, db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]]
             ]
         ]));
         
@@ -57,8 +56,7 @@ ObjectRelationUtils.getPossibleRelationTypes = function(pObjectType, pFullInfo)
              else type2.AB_OBJECTRELATIONTYPEID end objectrelationtypeId2, \n\
         main.SIDE" + sql, 
         [
-          [pObjectType, db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]],
-          [pObjectType, db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]],
+          [pObjectType, db.getColumnTypes("AB_OBJECTRELATIONTYPE", ["OBJECT_TYPE"])[0]]
         ]
     ]));