Skip to content
Snippets Groups Projects
Commit e68d8745 authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1054165][Eigenschaften: Filter nach...

[Projekt: Entwicklung - Neon][TicketNr.: 1054165][Eigenschaften: Filter nach "Ist leer" funktioniert nicht / Bei "Tag"-Attributen funktioniert "gleich Nein" nicht]
parent e0a999e0
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,7 @@ AttributeFilterExtensionMaker.getFilterCondition = function(pObjectType, pFilter
.and("AB_ATTRIBUTERELATION.AB_ATTRIBUTE_ID", attributeId);
var cond = SqlBuilder.EQUAL();
if (pOperatorName == "IS NOT NULL" || pRawValue == "1" && pOperatorName == "LIKE" || pRawValue == "0" && pOperatorName == "NOT LIKE")
if (pOperatorName == "IS NOT NULL" || pRawValue == "1" && pOperatorName == "=" || pRawValue == "0" && pOperatorName == "<>")
cond = SqlBuilder.GREATER();
resSql = newWhere(resSql, 0, cond, SQLTYPES.INTEGER).toString();
......@@ -136,12 +136,13 @@ AttributeFilterExtensionMaker.getFilterCondition = function(pObjectType, pFilter
//a SqlBuilder.IN() in a newWhere is not used here since the subselect can contain a placeholder
//(the variable condition) that would break the function
resSql = pIdTableName + "." + pIdColumnName + " in (" + newSelect("AB_ATTRIBUTERELATION.OBJECT_ROWID")
.from("AB_ATTRIBUTERELATION")
.where("AB_ATTRIBUTERELATION.OBJECT_ROWID = " + pIdTableName + "." + pIdColumnName)
.and("AB_ATTRIBUTERELATION.OBJECT_TYPE", pObjectType)
.and("AB_ATTRIBUTERELATION.AB_ATTRIBUTE_ID", attributeId)
.and(condition) + ")";
resSql = pIdTableName + "." + pIdColumnName + " in (" + newSelect(pIdTableName + "." + pIdColumnName)
.from(pIdTableName)
.leftJoin("AB_ATTRIBUTERELATION", newWhere("AB_ATTRIBUTERELATION.OBJECT_ROWID = " + pIdTableName + "." + pIdColumnName)
.and("AB_ATTRIBUTERELATION.OBJECT_TYPE", pObjectType)
.and("AB_ATTRIBUTERELATION.AB_ATTRIBUTE_ID", attributeId)
)
.where(condition) + ")";
}
return resSql;
};
......
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