Skip to content
Snippets Groups Projects
Commit 4f9ca553 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

object relation add description

parent 38a6e83a
No related branches found
No related tags found
No related merge requests found
......@@ -4309,6 +4309,20 @@
<title></title>
<description></description>
</entityFieldDb>
<entityFieldDb>
<name>INFO</name>
<dbName></dbName>
<primaryKey v="false" />
<columnType v="2005" />
<size v="2147483647" />
<scale v="0" />
<notNull v="false" />
<isUnique v="false" />
<index v="false" />
<documentation></documentation>
<title></title>
<description></description>
</entityFieldDb>
</entityFields>
</entityDb>
<entityDb>
......
......@@ -160,6 +160,10 @@
<entityField>
<name>OBJECT2_TYPE</name>
</entityField>
<entityField>
<name>INFO</name>
<title>Description</title>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -213,6 +217,10 @@
<name>OBJECT1_TYPE.value</name>
<expression>%aditoprj%/entity/ObjectRelation_entity/recordcontainers/db/recordfieldmappings/object1_type.value/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>INFO.value</name>
<recordfield>AB_OBJECTRELATION.INFO</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
......
......@@ -63,11 +63,6 @@
<searchable v="false" />
<valueProcess>%aditoprj%/entity/ObjectTree_entity/entityfields/icon/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>DESCRIPTION</name>
<searchable v="false" />
<valueProcess>%aditoprj%/entity/ObjectTree_entity/entityfields/description/valueProcess.js</valueProcess>
</entityField>
<entityField>
<name>Selector</name>
<title>Relationtype</title>
......@@ -113,6 +108,10 @@
<name>TARGET_CONTEXT</name>
<searchable v="false" />
</entityField>
<entityField>
<name>INFO</name>
<title>Description</title>
</entityField>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
......@@ -126,6 +125,7 @@
<element>EXPANDED.value</element>
<element>TARGET_ID.value</element>
<element>TARGET_CONTEXT.value</element>
<element>INFO.value</element>
<element>Selector.value</element>
</recordFields>
</jDitoRecordContainer>
......
import("system.result");
......@@ -54,7 +54,7 @@ function _loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationTypeId,
currentObjectId = _getRootID(currentObjectId, relationTypeData);
}
let uids = _insertEntry(tree, [[currentObjectId, "", "", "", ""]], pNodeId, pLayer, pObjectType)
let uids = _insertEntry(tree, [[currentObjectId, "", "", "", "", ""]], pNodeId, pLayer, pObjectType)
for (let i = 0; i < uids.length; i++)
{
_loadObjectRelationTree(uids[i][0], uids[i][3], relationTypeData[0], uids[i], pLayer+1, relationTypeData);
......@@ -75,7 +75,7 @@ function _loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationTypeId,
// TODO: Icons, BINDATA
// var icon = getIcon...
let uid = [currentObjectId, i, relationTypes[i]];
tree.push([JSON.stringify(uid), translate.text(relationTypes[i][1]), JSON.stringify(pNodeId), true, null, null, ""]);
tree.push([JSON.stringify(uid), translate.text(relationTypes[i][1]), JSON.stringify(pNodeId), true, null, null, "", ""]);
_loadObjectRelationTree(pObjectId, pObjectType, pObjectRelationTypeId, uid, pLayer+1, relationTypeData);
}
......@@ -180,9 +180,8 @@ function _getEntryData(pObjectId, pDirection, pRelationType1, pRelationType2, pP
// TODO: BINDATA?
// var image = getImageObject("Beziehung");
// TODO: RELDESC gibts noch nicht
var data = db.table(cond.buildSql(
"select OBJECT" + otherNum + "_ROWID, AB_OBJECTRELATIONID, OBJECT_TYPE, RELATION_TITLE \n\
"select OBJECT" + otherNum + "_ROWID, AB_OBJECTRELATIONID, OBJECT_TYPE, RELATION_TITLE, INFO \n\
from AB_OBJECTRELATION \n\
join AB_OBJECTRELATIONTYPE on AB_OBJECTRELATIONTYPEID = AB_OBJECTRELATIONTYPE" + myNum + " and ","1=2", "", false));
......@@ -228,7 +227,7 @@ function _insertEntry(pTree, pEntryData, pNodeId, pLayer, pObjectType, pNum)
if (pNum)
uid.push(pNum);
uids.push(uid);
pTree.push([JSON.stringify(uid), display, JSON.stringify(pNodeId), expanded, pEntryData[i][0], pObjectType, ""]);
pTree.push([JSON.stringify(uid), display, JSON.stringify(pNodeId), expanded, pEntryData[i][0], pObjectType, pEntryData[i][4], ""]);
}
return uids;
}
......
......@@ -21,6 +21,10 @@
<name>f60a0e0d-c3a9-4ab7-9b52-b33f5bb61d31</name>
<entityField>rowIdProxy</entityField>
</entityFieldLink>
<entityFieldLink>
<name>04579da5-0609-4a43-97dd-9e773ec1a29b</name>
<entityField>INFO</entityField>
</entityFieldLink>
</fields>
</genericViewTemplate>
</children>
......
......@@ -22,6 +22,10 @@
<name>ab25081c-cb63-4d28-87d0-e4c022aac878</name>
<entityField>rowIdProxy</entityField>
</neonTableColumn>
<neonTableColumn>
<name>a5e8b3d6-ff83-461a-ba28-d67e0df5d93d</name>
<entityField>INFO</entityField>
</neonTableColumn>
</columns>
</tableViewTemplate>
</children>
......
......@@ -14,7 +14,7 @@
<parentField>PARENT_ID</parentField>
<nodeExpandedField>EXPANDED</nodeExpandedField>
<titleField>TITLE</titleField>
<descriptionField>DESCRIPTION</descriptionField>
<descriptionField>INFO</descriptionField>
<iconField>ICON</iconField>
<entityField>#ENTITY</entityField>
</treeViewTemplate>
......
......@@ -25,6 +25,7 @@
<addColumn tableName="AB_OBJECTRELATION">
<column name="AB_OBJECTRELATIONTYPE1" type="CHAR(36)"/>
<column name="AB_OBJECTRELATIONTYPE2" type="CHAR(36)"/>
<column name="INFO" type="NCLOB"/>
</addColumn>
<dropIndex tableName="AB_OBJECTRELATION" indexName="IDX_AB_OBJECTRELATION_OBJECT1"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment