Michael, quick question ...
Where do you suggest I keep the Neo4jTemplate object. I cannot pass it in the object constructor to a transient private variable since we need a no-arg constructor, and passing it to a getter kind of leaks the db abstraction through my API. Any suggestion ?
You probably don't need it inside of your methods, the simple save() operation cascades at least to relationship-objects.
Could you handle this as part of a service? So you can persist the actual relationship-entities before they are added to the collection which might be good enough, depending on your use-case.
Sorry, no test case.
Originally Posted by MichaelHunger
After I saw that I wasn't retrieved the related nodes with fetch, I went down a separate path where I first get the top level Node then on the client side page I use AJAX to $.get() each collection as JSON and update the page when the JSON comes back. this way I can have 7 different .gets happening simultaneously to get all the collection nodes. And even yesterday I decided to restructure my page, so now I get a list of wrapper objects. no nodes for even less data being transferred. I will just write a nice complex traversal query to get just what I need on the first .get request. (Except for the index.jsp with no data, all my requests are REST Ajax JSON from client to server)