
Hey everyone, This week, we had a great turnout for our Intro to Spring Data Neo4j webinar, presented by Michael Hunger.
As promised, here are the rest of the questions that we weren’t able to cover during the Spring Data Neo4j session:What’s the difference between RelatedTo
and RelatedToVia
?
RelatedTo
refers to the node-entities at the other end of the relationship, while RelatedToVia
refers to relationships themselves (as relationship-entities).
Is there any facility for “supernode” relationship navigation? For example, if Movie has 1M Ratings, but I only care about obtaining the Director, to have an “automatic” IndexedRelationshipExpander
You might add indexing to the relationship-entities to write the index (withIndexed
. You can also look into using computed properties with GraphTraversal
and TraversalBuilder
or go for template.traverse()
or repository.traverse()
to retrieve those (and use a custom expander there).
Can I open the same Neo4j graph database in two different applications using Embedded?
No. For embedded, only one JVM can access the store files at a time. You would have to make your own mini-server exposing a protocol (TCP, RMI, HTTP, Websockets, JMX) on top of that database to interact with it from other processes. For more info on Spring Data Neo4j check out the following resources:-
- Introduction to Spring Data Neo4j with Presentation Slides, Presented by Michael Hunger and Recorded at SpringOne2GX
- GitHub Source Code
- Cineasts.net
- Spring Data Forum
- Videos and webinars