diff --git a/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js b/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js index b0ff1bf408083a9de5e53d3e314d8a431f1e7923..f85cd0bacff82c5ee19ec1f36601666434c9d1f6 100644 --- a/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js @@ -11,7 +11,7 @@ if (vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param" var contextList = JSON.parse(vars.getString("$param.ObjectType_param")); contextList.forEach(function (context) { - var data = db.table(ContextUtils.getContextDataSql(context, vars.get("$param.ObjectRowId_param"))); + var data = db.table(ContextUtils.getContextDataSql(context, vars.get("$param.ObjectRowId_param"), true)); data.forEach(function (row) { var record = []; diff --git a/entity/Object_entity/recordcontainers/jdito/contentProcess.js b/entity/Object_entity/recordcontainers/jdito/contentProcess.js index fa1404cf0aa5adb9dd28c57581124986ae7deaf5..49ee3565f7153850a52fd919d0ab1e01a1880693 100644 --- a/entity/Object_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Object_entity/recordcontainers/jdito/contentProcess.js @@ -7,11 +7,11 @@ if (vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param" { if (vars.exists("$param.ObjectRowId_param") && vars.get("$param.ObjectRowId_param")) { - result.object(db.table(vars.get("$param.ObjectRowId_param"), ContextUtils.getContextDataSql(vars.get("$param.ObjectType_param"), vars.get("$param.ObjectRowId_param")))); + result.object(db.table(vars.get("$param.ObjectRowId_param"), ContextUtils.getContextDataSql(vars.get("$param.ObjectType_param"), vars.get("$param.ObjectRowId_param"), false))); } else { - result.object(db.table(ContextUtils.getContextDataSql(vars.get("$param.ObjectType_param")))) + result.object(db.table(ContextUtils.getContextDataSql(vars.get("$param.ObjectType_param"), undefined, false))) } } else diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js index c328d63048230e5a42038bb30bcbb0307415c005..698392214a43b109d79f978f94c7904d1f5ce1ba 100644 --- a/process/Context_lib/process.js +++ b/process/Context_lib/process.js @@ -246,7 +246,7 @@ ContextUtils.getNameSql = function(pContextId, pRowId) /** * TODO: !!!temporary function until you can get fields from another Entity!!! */ -ContextUtils.getContextDataSql = function(pContextId, pRowId) +ContextUtils.getContextDataSql = function(pContextId, pRowId, pWithDate) { var selectMap = ContextUtils._getSelectMap() var cond = SqlCondition.begin(); @@ -254,7 +254,10 @@ ContextUtils.getContextDataSql = function(pContextId, pRowId) { cond.andPrepare(selectMap[pContextId][1] + "." + selectMap[pContextId][3], pRowId) } - - return cond.buildSql("select " + selectMap[pContextId][2] + ", " + selectMap[pContextId][0] + ", " + selectMap[pContextId][4] + " from " + selectMap[pContextId][1], "1=1"); -} + var dateColumn = ""; + if (pWithDate === true) + dateColumn = ", " + selectMap[pContextId][4]; + + return cond.buildSql("select " + selectMap[pContextId][2] + ", " + selectMap[pContextId][0] + dateColumn + " from " + selectMap[pContextId][1], "1=1"); +}