Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

Commit

Permalink
fix: multiple control actions generated when match query returns mult…
Browse files Browse the repository at this point in the history
…iple items

Fixes #138
  • Loading branch information
ChristiaanScheermeijer committed Feb 24, 2021
1 parent bcf853b commit 2b1de56
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/commands/RequestControlActionCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 2b1de56

Please sign in to comment.