I need some help with some puzzling behavior of Spring/OGM/Neo4j.
I have a node entity (Movie) with an outgoing relationship to another node entity (Actor).
Creating a new movie with a new actor works just fine.
However, when I take an existing movie, change the actor to a new node entity and save the adjusted movie the relationship is not changed and the new actor node is not saved. Basically any relationship properties of existing nodes are not updated at all!
I've created a small example repository with a failing integration test:
In there I do the following:
- Create a movie
- Create an actor (actor1)
- Set movie -> actor1
- Save the movie
- Create another actor (actor2)
- Set movie -> actor2
- Save the adjusted movie
- Request the movie, expect the actor to be actor2 (which fails)