Announcement Announcement Module
No announcement yet.
Spring Data JPA and Spring Data Neo4J Cross Store query question Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Data JPA and Spring Data Neo4J Cross Store query question

    This may sound stupid of me, but when working on an entity that is a cross store entity. You have to persist and quer y each database separately, Or can we do it with just one Repository or Template.

    So if I want to load a User object that is a cross store, can I just use the Neo4J GraphRepository find by id method and it will return a populated User object from data from both Neo4J and the relational database. And when I call the save method of GraphRepository that it will insert, update, delete from both databases correctly without any extra work on my part?

    I am guessing that yes, I find through GraphRepository that it gets from both database. Otherwise, why would the neo4j:config need a reference to the EntityManagerFactory bean



  • #2
    Yes, if you load an entity via SDN you will get it fully populated. When saving though it is not yet saved to the JPA store, we might want to add that via the new BeforeSave Event.

    Same goes for deletion. Updates will work if they are done in a transaction b/c the commit of changes or loaded entities happens automatically.

    Can you raise an issue about this on ?