ADi3ek / neo4j-spring-boot-demo

Change or delete relationship between nodes with Neo4j OGM and Spring Boot Data

Home Page:https://stackoverflow.com/questions/49783019/unable-to-change-or-delete-relationship-between-nodes-with-neo4j-ogm-and-spring

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a simple Spring Boot project to showcase the problem described on StackOverflow here:

https://stackoverflow.com/questions/49783019/unable-to-change-or-delete-relationship-between-nodes-with-neo4j-ogm-using-sprin

And also reported here:

https://jira.spring.io/browse/DATAGRAPH-1082

EDIT: The issue is now resolved by adding @Transactional annotation to command methods

The demo uses Spring Boot framework with Spring Data Neo4j module. There are two nodes and one relationship between them defined:

  • Task node, which can have one Status (HAS_STATUS outgoing relationship)
  • Status node, which can have HAS_STATUS incoming relationships from different Task nodes

One can manipulate the nodes using Spring shell commands:

  • create-statuses - creates all three demo Status nodes at once: todo, in_progress, done

  • create-task - creates task node with provided task key and status key, usage example:

    create-task TASK1 todo

  • update-task-status - updates the task with a new Status, usage example:

    update-task-status TASK1 in_progress

About

Change or delete relationship between nodes with Neo4j OGM and Spring Boot Data

https://stackoverflow.com/questions/49783019/unable-to-change-or-delete-relationship-between-nodes-with-neo4j-ogm-and-spring


Languages

Language:Java 100.0%