cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Update of a relationship fails without error

Hi!

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:

  1. Create a movie
  2. Create an actor (actor1)
  3. Set movie -> actor1
  4. Save the movie
  5. Create another actor (actor2)
  6. Set movie -> actor2
  7. Save the adjusted movie
  8. Request the movie, expect the actor to be actor2 (which fails)

Any idea?

1 REPLY 1

Got it myself – missing @Transactional at the method.