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
4
votes
2 answers

Neo4jRepository @Query result error when there are many relationships for same node

Let's suppose we use this simple graph model: @NodeEntity class Ad { // GraphId and more Ad attributes... @Relationship(type = "HAS_ADVERTISER", direction = Relationship.OUTGOING) private User advertiser; @Relationship(type =…
troig
  • 7,072
  • 4
  • 37
  • 63
4
votes
1 answer

Deploy a Procedure to Neo4J when using the embedded driver

I have some logic which needs direct node access to neo4j but the rest of the app using Spring Data Neo4j (SDN) for simplicity. I thought to use a procedure with @Procedure, but I'm not sure how to use that procedure when using the neo4j embedded…
4
votes
1 answer

Neo4j OGM MappingException

I am trying to get the results of a cypher query on OGM. Basically, I have been following this tutorial: OGM Tutorial. I have an entity interface (identical to the one on the tutorial): public abstract class Entity { private Long id; …
felipepo
  • 57
  • 1
  • 8
4
votes
0 answers

Neo4j and lost relationships

I have a very strange behavior of neo4j. Sometimes, and I can't reproduce the issue now, the relationship between two nodes is lost. For example I have these nodes: @NodeEntity(label = "Worker") public class WorkerEntity { @GraphId private…
aGO
  • 1,263
  • 14
  • 30
4
votes
1 answer

Spring Data Neo4J 4 - no template.fetch()

I'm trying to upgrade from Spring Data Neo4J 3 to 4 - I'm using Neo4J 2.2.2. I use a GraphRepository instance to query the database, fetching back an object. This object has several relationships, which are not fetched (deliberately, to avoid…
TrueDub
  • 5,000
  • 1
  • 27
  • 33
4
votes
1 answer

SDN4 - Neo4j OGM + Jackson 2.0

I am trying to use Jackson 2.x annotations on a Spring Data Neo4j 4.0.0RC1 entity but am seeing failures in my application context starting. I have two @NodeEntities that implement an interface and I've annotated the interface as…
simonl
  • 1,240
  • 7
  • 19
4
votes
1 answer

SDN4 - Updating a relationship entity's child causes the relationship to be deleted

I am writing some GraphUnit supported integration tests and have noticed odd behavior when I attempt to update the child node an existing relationship points to. Given an existing relationship with a backing graph that looks…
simonl
  • 1,240
  • 7
  • 19
4
votes
2 answers

SDN 3.3.0 or SDN 4.0M1?

Currently starting a new Java project with Neo4j (2.2 probably) external server as primary database, we decided to use SDN. This is going to be a year-long project with multiple intermediate releases. We wonder about whether we should go for the…
Gaël N.
  • 121
  • 8
3
votes
1 answer

Spring Data Neo4j @Query not returning child nodes

I've four pojos related by unique relationship. First Employee node: @NodeEntity public class Employee { @GraphId private Long id; @Index(unique = true) private String employeeId; @Relationship(type = "HAS_POSITION", direction…
Abhinab Kanrar
  • 1,532
  • 2
  • 20
  • 46
3
votes
1 answer

Mapping Exception with a relationship between two nodes of the same type in Neo4j and Spring Data

I have a problem when I try to retrieve two nodes with the same label (the same type) and a relathioship between both whit spring data. I did a query for get the last one, like that: @Query("MATCH (b1:Block)-[rel]->(b2) " + "WHERE NOT…
Xavi Torrens
  • 337
  • 1
  • 12
3
votes
1 answer

Neo4j Cypher multiple WITH keywords

I have a following Neo4j Cypher query: MATCH (parentD:Decision)-[:CONTAINS]->(childD:Decision) WHERE id(parentD) = {parentDecisionId} WITH childD, parentD OPTIONAL MATCH…
alexanoid
  • 24,051
  • 54
  • 210
  • 410
3
votes
3 answers

Loading 9M rows from Neo4j and writing it into CSV throws out of memory exception

I have a big graph model and I need to write the result of following query into a csv. Match (u:USER)-[r:PURCHASED]->(o:ORDER)-[h:HAS]->(i:ITEM) return u.id as userId,i.product_number as itemId When I "Explain" query, this is the result I get…
Lina
  • 1,217
  • 1
  • 15
  • 28
3
votes
1 answer

Database migrations with Neo4j and Spring

I have this kind sample project HERE In that sample data, I try to use Flyway to implement database migration with neo4j database. I can create and insert normal SQL with H2 database (I used H2 database in my sample project), but I dunno how to…
David Vincent
  • 634
  • 1
  • 8
  • 33
3
votes
1 answer

Spring Data Neo4j (4.2.0M1) count Cypher query return type different from embedded DB than for remote one

We have found an issue by testing our code where a count cypher query is used. If the test is running against an embedded database (EmbeddedDriver) the returned value within the Result type is a Long (or an Integer, I dont' remember) and when the…
3
votes
1 answer

Creating a node in neo4j with one unique property other than ID

My Project is based on Spring boot + Neo4j . I am trying to create a new Privilege node , but don't want to duplicate Privilege. Now I have a UserRole node which is holds List. Now I want that when I create a Privilege , it check first…
mohit sharma
  • 1,050
  • 10
  • 20
1
2
3
34 35