Questions tagged [spring-data-neo4j-4]

The Spring Data Neo4j project, as part of the Spring Data initiative, aims to simplify development with the Neo4j graph database. Like JPA, it uses annotations on simple POJO domain objects. Together with metadata, the annotations drive mapping the POJO entities and their fields to nodes, relationships, and properties in the graph database.

For version 4, Spring Data Neo4j has been rewritten from scratch to natively support Neo4j deployments in standalone server mode. It uses Cypher, the Neo4j query language, and the HTTP protocol to communicate with the database.

The guide for Spring Data Neo4j 4 is available at http://docs.spring.io/spring-data/neo4j/docs/4.0.0.M1/reference/html/

517 questions
0
votes
1 answer

Entity can still be found after being deleted

I'm working with Spring Data Neo4j 4 and have the following user entity @NodeEntity public class User{ private Long id; private String username; //Getter, Setter } Using the Neo4j GraphRepository, i first create the user in one transaction…
Urr4
  • 611
  • 9
  • 26
0
votes
1 answer

Spring Data Neo4j Parent Child filtering

I'm having a node relationship like above diagram my Classes @NodeEntity public class User { @GraphId private Long id; @Property(name="name") private String name; @Relationship(type = "CAN_ACCESS", direction =…
0
votes
0 answers

Spring Data Neo4j 4 very slow for large hierarchical queries

I am currently using SpringDataNeo4j–4.1.0.M1 and have a use case where I need to get a sub-graph (actually a tree) and return it in an hierarchical structure similar to this (these sub-graphs are usually around 500 nodes in size and have an…
fkorn
  • 50
  • 6
0
votes
1 answer

Annotate inherited class fields

I'm working with Spring Data Neo4j and want to persist an user into the Neo4j DB. The user (Neo4jUser) extends an user from a generic project that is independent from the Neo4j implementation. Since every user should have a id, username and email,…
Urr4
  • 611
  • 9
  • 26
0
votes
1 answer

Wipe InProcess Neo4j DB after each test

I'm using Spring with a Test-Configuration that gives my an InProcessServer Neo4j Database that i use for testing. Sadly, after each @Test method, there is still scrap-data in this database. Is it possible to wipe this DB after each Test-Method?
Urr4
  • 611
  • 9
  • 26
0
votes
2 answers

Temporary Neo4j database to test services

I'm building a Spring Application using a Neo4j database. I have some services, that implement basic database-functions like persisting a user or finding a user by his username. Since I implemented some restraints, for example that it's not possible…
Urr4
  • 611
  • 9
  • 26
0
votes
1 answer

Spring-data-neo4j get nodes and labels

I am currently usring Spring and neo4j. One mission is to display the graph using linkurious. However, how can I tell Spring through spring-data-neo4j the labels of the nodes? I need the labels to color the graph in linkurious. If using findAll()…
Steven Luo
  • 2,350
  • 3
  • 18
  • 35
0
votes
2 answers

Is there a way to get all the labels for a node in SDN 4.0

I want to get all the labels belongs to a node, if there a way to do this in one query in SDN 4.0? For example, my current repo is like Book findById(Long bookId); @Query("MATCH (n:Book) where id(n)={0} set n:AnotherLabel return n") Book…
jasonfungsing
  • 1,625
  • 8
  • 22
  • 34
0
votes
1 answer

how to enable remote shell with embedded db on SDN4?

Hi I'm using the following configuration driver=org.neo4j.ogm.drivers.embedded.driver.EmbeddedDriver URI=file:///data/graph in ogm.properties file how can i enable remote shell with it? thanks
Loki
  • 659
  • 1
  • 8
  • 18
0
votes
1 answer

Spring-data-neo4j map cannot be cast to nodeentity

I am using Spring-data-neo4j but meet the following problem. Everything works fine until I want to cast the queried LinkedHashMap to an @NodeEntity. Here's the code Movie.class @NodeEntity public class Movie { @GraphId Long…
Steven Luo
  • 2,350
  • 3
  • 18
  • 35
0
votes
1 answer

How to make indexes in SDN4 with embedded database?

Spring Data Neo4j 4 does not support @Index annotation anymore. With standalone Neo4j database I have to deploy indexes on my own using its REST or web interface. However, with database in embedded mode there are no such interfaces. Do I have to…
Cob
  • 171
  • 10
0
votes
1 answer

Overriding hashCode() method does not allow saving of class properties in Neo4J

I am trying to persist the following class in a Neo4J database using spring-data-neo4j version 4.0.0.RELEASE. It is a class named 'GroupCategory' with some fields like name, ownerId etc. It has overwritten the equals and hashcode methods as provided…
Soumya
  • 1,833
  • 5
  • 34
  • 45
0
votes
1 answer

SDN 4, delete cache when I delete related entity

There. I'm using sdn4 with java 8. I make this relation Owner -Has- truck. and delete truck using truckReposity(extends GraphRepository). If checking truck is deleted in Neo4j broswer, It is deleted. but Running web application has still have…
reperion
  • 129
  • 9
0
votes
1 answer

SDN 4- findAll(1) return duplicated results

I'm using SDN 4 with Java 8. I'm testing this code. I have two owner and each owner have one truck. repository.findAll(1).forEach(owner -> { logger.info(owner.toString()); }); I expect logging two rows(owner). however It prints 4 rows.(twice…
reperion
  • 129
  • 9
0
votes
1 answer

Neo4j - Parent - Child heirarchy + Spring

We have a structure where a Parent can have multiple child with nested structure. 1: Parent p1 child c1 c1.1 c1.2 child c2 c2.1 c2.3 Now using one cypher query , I need to get the whole…