diff --git a/process/Attribute_lib/process.js b/process/Attribute_lib/process.js index 9fd2230221263fd1de7423ef86b50dd8fbdfe473..23fb2e7385eea2c4c989ebca11ee95d7f428dae0 100644 --- a/process/Attribute_lib/process.js +++ b/process/Attribute_lib/process.js @@ -1528,7 +1528,7 @@ AttributeRelationQuery.prototype.includeDisplayValue = function () /** * Executes the query and returns the result, depending on the properties of the AttributeRelationQuery object. * - * @return {Object[]} <p> + * @return {AttributeRelation[]} <p> * Array of objects. By default, the objects contain the properties: * <ul> * <li>attributeId</li> @@ -1549,8 +1549,11 @@ AttributeRelationQuery.prototype.getAttributes = function () "AB_ATTRIBUTE.ATTRIBUTE_NAME", "COMBOVAL.ATTRIBUTE_NAME", "AB_ATTRIBUTE.AB_ATTRIBUTEID", - "AB_ATTRIBUTERELATION.AB_ATTRIBUTERELATIONID" + "AB_ATTRIBUTERELATION.AB_ATTRIBUTERELATIONID", + "AB_ATTRIBUTERELATION.OBJECT_ROWID", + "AB_ATTRIBUTERELATION.OBJECT_TYPE" ]; + var valueFields = AttributeTypeUtil.getAllDatabaseFields(); @@ -1564,13 +1567,8 @@ AttributeRelationQuery.prototype.getAttributes = function () var mappingFn = function (row) { - var attrObj = { - attributeId : row[4], - value : row[AttributeTypeUtil.getTypeColumnIndex(row[0]) + defaultFields.length], - attributeRelationId : row[5], - attributeName : row[2], - attributeType : row[0] - }; + var attrObj = new AttributeRelation(row[5], row[4], row[AttributeTypeUtil.getTypeColumnIndex(row[0]) + defaultFields.length], + row[2], row[0], row[6], row[7]); if (this._includeDisplayValue) { @@ -1594,7 +1592,7 @@ AttributeRelationQuery.prototype.getAttributes = function () * If this method is executed on your AttributeRelationQuery<br> * object it will return only one attribute. * - * @return {Object} <p> + * @return {AttributeRelation} <p> * Returns the AttributeRelationQuery object<br> * with only a sinlge attribute.<br> */