diff --git a/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js b/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js index eedfa1d7de070cca04a3f9c46837ab4449032791..6ed5a08a2366f64ef2fadc14976b411edb6d210e 100644 --- a/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/ObjectTree_entity/recordcontainers/jdito/contentProcess.js @@ -18,6 +18,8 @@ import("Contact_lib"); * - the "tree" is returned */ +//TODO: Refactoring in this process. It's rather hard to understand and uses more sql queries than necessary. + //uid array structure var UID = { objectId: 0, diff --git a/entity/ObjectTree_entity/recordcontainers/jdito/onInsert.js b/entity/ObjectTree_entity/recordcontainers/jdito/onInsert.js index b213c506967a5ede2bbf1dffd99b92357587cc8d..4ff38cdf98c122625cf196a8ad0d0fbf8647b782 100644 --- a/entity/ObjectTree_entity/recordcontainers/jdito/onInsert.js +++ b/entity/ObjectTree_entity/recordcontainers/jdito/onInsert.js @@ -20,7 +20,7 @@ if (selectedObjectRelationTypeId) var objectId1 = rowdata["PARENT_ID.value"]; var objectId2 = rowdata["TARGET_ID.value"]; - if (side == "1") + if (side != "1") [objectId1, objectId2] = [objectId2, objectId1]; db.insertData("AB_OBJECTRELATION", [