2
votes

Is it possible to have full access to my neo4j graph with spring framework if I haven't build the graph with using spring? I am trying some examples and it seems that it's not working properly as some metadata that spring creates don't exists.

EDIT: For example I have this error No primary SDN label exists .. (i.e one starting with _) when I am trying to access a node by it's id i.e. nodeRepository.findOne(new Long(157138))

1
I've used neo4j a lot, but I'm new to spring-data-neo4j. I observe that there's a fair amount of class magic going on in the background, where certain Java classes get mapped to certain labels in the DB. According to the class inheritance hierarchy, it seems in our spring-data-neo4j DBs that many nodes will get many labels (corresponding to intermediate classes). - FrobberOfBits
Let's see if you get an answer, I'm interested too - from the limited bit of how I've seen it work, I'm guessing you'll need to transform your data into a set of labels that spring-data-neo4j would recognize as being bound to a particular set of objects before it's going to work, but hopefully I'm wrong. - FrobberOfBits

1 Answers

0
votes

Use template.postEntityCreation(node/rel, DomainEntity.class) to add the metadata or look into Spring Data Neo4j 4 which also works with your existing graph out of the box.