Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1152 and #2247: Deleting nodes when having an apoc.trigger registered returns Neo.DatabaseError.Transaction.TransactionCommitFailed #2596

Merged
merged 3 commits into from
May 3, 2022

Conversation

vga91
Copy link
Collaborator

@vga91 vga91 commented Mar 1, 2022

Fixes #2247

Changed TriggerMetadata.rebindDeleted(), not to leverage on node.getLabels(), node.getAllProperties(), rel.getAllProperties() (these fail),
but respectively on txData.removedLabels(), txData.removedNodeProperties() and txData.removedRelationshipProperties().

  • added rebindDeleted in TriggerMetadata.from(..) to removedRelationshipProperties, removedNodeProperties and removedLabels to leverage on virtual entities.
  • added tests in TriggerTest.java

Fixes #1152

  • added apoc.trigger.toNode and apoc.trigger.toRelationship to retrieve labels and props entity infos with phase 'before' and 'after' (via apoc.any.properties and apoc.node.labels functions), similarly to TriggerMetadata.rebindDeleted() function (which is called only with phase 'afterAsync')
  • added docs
  • added tests in TriggerExtendedTest.java

@vga91 vga91 changed the title Fixes #1152 and #2247: Deleting nodes when having an apoc.trigger reg… Fixes #1152 and #2247: Deleting nodes when having an apoc.trigger registered returns Neo.DatabaseError.Transaction.TransactionCommitFailed Mar 2, 2022
@Lojjs Lojjs added the 4.2 label Mar 28, 2022
@vga91 vga91 force-pushed the issue-1152 branch 4 times, most recently from 49f6d85 to 80a8774 Compare April 13, 2022 13:41
…having an apoc.trigger registered returns Neo.DatabaseError.Transaction.TransactionCommitFailed
@JMHReif JMHReif merged commit b3a53fb into neo4j-contrib:4.2 May 3, 2022
neo4j-oss-build pushed a commit that referenced this pull request May 3, 2022
…abaseError.Transaction.TransactionCommitFailed (#2596)

Fixes #1152 and #2247
JMHReif pushed a commit that referenced this pull request May 3, 2022
…abaseError.Transaction.TransactionCommitFailed (#2596)

Fixes #1152 and #2247
neo4j-oss-build pushed a commit that referenced this pull request May 3, 2022
…abaseError.Transaction.TransactionCommitFailed (#2596)

Fixes #1152 and #2247
JMHReif pushed a commit that referenced this pull request May 3, 2022
…abaseError.Transaction.TransactionCommitFailed (#2596)

Fixes #1152 and #2247
vga91 added a commit to vga91/neo4j-apoc-procedures that referenced this pull request May 17, 2022
conker84 added a commit that referenced this pull request May 17, 2022
…abaseError.Transaction.TransactionCommitFailed (#2596) (#2899)

Fixes #1152 and #2247

Co-authored-by: Giuseppe Villani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants