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.

Spring, OGM and Transactions

We are using Spring Boot 2.1.16 and experience intermittent issues with relationships being lost (or duplicated) when saving nodes.

Have not been able to reliably reproduce the problem. A few times when there has been a reproducable case adding @Transactional to the offending method fixed the problem, but the really weird thing is that if I then removed @Transactional (that was just added) the problem no longer occurred.

Had a case where setting a relationship worked fine for me, but was not for a colleague running the same code (against a different database). Logging showed the MERGE to update the relationship was not being called for him.

Getting frustrated and looking for some clues. @Transactional appears to be something that has an impact and wondering if there are any guidelines on how transactions work with the mapping between Spring nodes and Neo4J. For example should all the nodes involved in the tx be loaded inside the tx?

1 REPLY 1

Is there any information on how Spring Data manages OGM sessions?