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
2
votes
1 answer

Spring OAuth 2 + Spring Data Neo4j multi-tenancy

I'm going to implement multi-tenancy support in my Spring OAuth 2 + Spring Data Neo4j project. I have configure my OAuth2 Authorization Server with a few different clients with a different clientId. Also, I have added a base TenantEntity to my…
alexanoid
  • 24,051
  • 54
  • 210
  • 410
2
votes
1 answer

Neo4j 3.0.6 and neo4j-ogm 2.0.5 - Create duplicate data on database

I have a problem with neo4j database. When I try to init data, it should be just create one sample data but sometimes when I try to init data, it create double sample data. There is no trace about calling second times. This is the Config of my…
David Vincent
  • 634
  • 1
  • 8
  • 33
2
votes
1 answer

Spring Data Neo4j - Argument Type Mismatch

I used Neo4j 3.0.6, neo4j-ogm 2.0.5, Spring boot starter 1.4.1 RELEASE, Lucene 5.5.2 This is my Machine and machineSectionSummary class (I only post the field, actually there are properties and constructors). When I call updateMachineSectionSummary…
2
votes
1 answer

how to get an entity By a related object id when using spring data neo4j?

@NodeEntity public class Person { @GraphId private Long nodeId; private String name; private String addr; private int age; @Relationship(type="WATCH") private Set movies; } @NodeEntity public class Movie{ @GraphId private…
2
votes
1 answer

Neo4j - Spring get String list from labels

How can i retrieve in Spring a List from this query MATCH (n) WITH DISTINCT LABELS (n) as labels RETURN labels Which doesn't create a node, but return just some strings referred to all different labels in my neo4j database?
user6517480
2
votes
0 answers

Rollback problems with new Neo4jTransactionManager

I'm using Spring-data-neo4j 4.2.0.RC1 and I have problems with the new Neo4jTransactionManager class. I have problems with transaction rollbacks. Exceptions are thrown from Neo4jTransactionManager class that are overriding application exceptions on…
tigrou83
  • 157
  • 10
2
votes
1 answer

Spring data neo4j (4.1) consistency and mapping problems with relationship entities

I'm using SDN 4.1.2 with neo4j 3.0.4 and I discovered strange behaviors that I summarized in simple code snippets (using HttpDriver with remote database). I have 2 problems (see details below): repository count() method that returns wrong count on…
2
votes
1 answer

Spring Data Neo4j 4.x uniqueness constraint?

Spring Data Neo4j 3.2 had an @Indexed annotation that allowed for a uniqueness constraint which is gone from the 4.x code base. The best I can tell historically there were two annotations: import org.neo4j.ogm.annotation.Index; // 4.0.0.M1 import…
Mike Summers
  • 2,139
  • 3
  • 27
  • 57
2
votes
2 answers

Add a second label to an inherited node in spring-data-neo4j-4

Let's have this class structure: @NodeEntity abstract class BasicNodeEntity { @GraphId private Long nodeId; //... } abstract class IdentifiableEntity extends BasicNodeEntity { private String id; //... } abstract class Ad…
troig
  • 7,072
  • 4
  • 37
  • 63
2
votes
1 answer

Spring Boot + Neo4j get GraphDatabaseService bean?

Using the new-style (Spring Data Neo4j 4.1.2.RELEASE) Neo4jConfiguration can I get a reference to the underlying embedded GraphDatabaseService to pass to the web ui? New style config: @Configuration @EnableNeo4jRepositories(basePackages =…
Mike Summers
  • 2,139
  • 3
  • 27
  • 57
2
votes
2 answers

How can I use the Bolt driver with Spring Boot/Data Neo4j

I get this error from Spring Boot. Could not deduce driver to use based on URI 'bolt://localhost:7687 when attempting to configure with properties, or env variable spring.data.neo4j.uri=bolt://localhost:7687 I did add the driver
xenoterracide
  • 16,274
  • 24
  • 118
  • 243
2
votes
1 answer

neo4j null pointer exception while saving via @Repository

The sample project i'm working with can be found attached here - Spring Jira This is my configuration @EnableNeo4jRepositories(basePackages = "com.graph.repository") public class DBConfig extends Neo4jConfiguration{ …
ShoibAhamed
  • 327
  • 1
  • 5
  • 16
2
votes
1 answer

Spring Data Neo4j 4 and Pageable @QueryResult

I'm trying to introduce Pageable support for my custom Cyper query over SDN 4 Repository method: @Query(value = "MATCH (parentD)-[:CONTAINS]->(childD:Decision)-[ru:CREATED_BY]->(u:User) WHERE id(parentD) = {decisionId} OPTIONAL MATCH…
alexanoid
  • 24,051
  • 54
  • 210
  • 410
2
votes
1 answer

Neo4j bean classes are not loaded in docker deployment version

I have a problem with SessionFactory bean package scanning … my application is using spring boot and spring data neo4j … If I run the app via spring boot , everything works fine and all of my bean classes get loaded in the session factory without…
Lina
  • 1,217
  • 1
  • 15
  • 28
2
votes
0 answers

SDN4 Neo4j 3.0.3 query/ogm performance optimization

In My Neo4j 3.0.3 Spring Data Neo4j 4.2.0.SNAPSHOT project I have a following entities: @NodeEntity public abstract class BaseEntity { @GraphId private Long id; private Date createDate; private Date…
alexanoid
  • 24,051
  • 54
  • 210
  • 410