Skip to content
Snippets Groups Projects
Commit fca3bfcd authored by S.Listl's avatar S.Listl
Browse files

Attribute exists fix

parent e218fe70
No related branches found
No related tags found
No related merge requests found
......@@ -20,12 +20,10 @@ if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT)
var hasSubordinate = db.cell(SqlCondition.begin()
.andPrepareVars("AB_ATTRIBUTE.AB_ATTRIBUTEID", "$field.UID")
.buildSql(
"select exists ("
+ "select SUB.AB_ATTRIBUTEID from AB_ATTRIBUTE SUB "
+ "where SUB.ATTRIBUTE_PARENT_ID = AB_ATTRIBUTE.AB_ATTRIBUTEID"
+ ") from AB_ATTRIBUTE", "1=2"
"select count(SUB.AB_ATTRIBUTEID) from AB_ATTRIBUTE SUB "
+ "where SUB.ATTRIBUTE_PARENT_ID = AB_ATTRIBUTE.AB_ATTRIBUTEID", "1=2"
)
) == "true";
) > 0;
if (hasSubordinate)
state = neon.COMPONENTSTATE_READONLY;
}
......
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