Skip to content
Snippets Groups Projects
Commit 8437dda7 authored by Benjamin Ulrich's avatar Benjamin Ulrich :speech_balloon: Committed by Sebastian Listl
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1057177][Schlüsselwort-Eigenschaft,...

[Projekt: Entwicklung - Neon][TicketNr.: 1057177][Schlüsselwort-Eigenschaft, die in Verwendung ist, darf nicht gelöscht werden können]
parent 048f2e0c
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/KeywordAttribute_entity/documentation.adoc</documentation>
<title>Keyword Attribute</title>
<grantDeleteProcess>%aditoprj%/entity/KeywordAttribute_entity/grantDeleteProcess.js</grantDeleteProcess>
<contentTitleProcess>%aditoprj%/entity/KeywordAttribute_entity/contentTitleProcess.js</contentTitleProcess>
<iconId>VAADIN:KEY_O</iconId>
<iconIdProcess>%aditoprj%/entity/KeywordAttribute_entity/iconIdProcess.js</iconIdProcess>
......
import("system.result");
import("Attribute_lib");
import("system.vars");
import("Sql_lib");
import("Entity_lib");
var id = vars.get("$field.AB_KEYWORD_ATTRIBUTEID");
var countSql = newSelect("count(*)")
.from("AB_KEYWORD_ATTRIBUTERELATION")
.where("AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ATTRIBUTE_ID", id)
var canDelete = new HasLinkedObjectTester()
.andSqlYieldsZero(countSql)
.andNoEntityRows("KeywordAttributeRelation_entity", "AttributesForKeywordEntry", {KeywordEntryId_param: id})
.validate();
result.string(canDelete);
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