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 session:
What's the difference between @RelatedTo and @RelatedToVia?
- @RelatedTo refers to the node-entities at the other end of the relationship
- @RelatedToVia refers to relationships themselves (as relationship-entities)
Is there any facility for "supernode" relationship navigation ?
ie. 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 (with @Indexed)
- You might 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 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 db to interact with it from other processes
For more info on Spring Data Neo4j check out:
Introduction to Spring Data Neo4j
Presented by Michael Hunger
Recorded at SpringOne2GX