diff --git a/src/commands/RequestControlActionCommand.js b/src/commands/RequestControlActionCommand.js index 806c716..582a267 100644 --- a/src/commands/RequestControlActionCommand.js +++ b/src/commands/RequestControlActionCommand.js @@ -114,6 +114,7 @@ class RequestControlActionCommand { `MATCH (\`entryPoint\`:\`EntryPoint\` {\`identifier\`:"${requestInput.entryPointIdentifier}"})${this.queryHelper.generateRelationClause('EntryPoint', 'potentialAction')}(\`potentialControlAction\`:\`ControlAction\` {\`identifier\`:"${requestInput.potentialActionIdentifier}"})`, propertySelections ? `, ${propertySelections}` : '', `WITH \`entryPoint\`, \`potentialControlAction\`${nodeAliasesClause}`, + `LIMIT 1`, `CREATE (\`entryPoint\`)${this.queryHelper.generateRelationClause('ControlAction', 'target', null, true)}(\`controlAction\`:\`ControlAction\`:\`ActionInterface\`:\`ProvenanceActivityInterface\`:\`ProvenanceEntityInterface\`:\`ThingInterface\` {${this._generateControlActionPropertyClause(template.potentialAction)}})${this.queryHelper.generateRelationClause('ControlAction', 'wasDerivedFrom')}(\`potentialControlAction\`)`, `WITH \`entryPoint\`, \`potentialControlAction\`, \`controlAction\`${nodeAliasesClause}`, this._generateCreatePropertyValuesClause(template, requestInput),