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 Data Neo4j custom query list params not use converter

NodeEntity: @NodeEntity(label = "User") public class UserNode { @GraphId private Long _gid; @Index(unique = true, primary = true) @Convert(ObjectIdConverter.class) private ObjectId id; } Converter: public class…
Alex
  • 368
  • 1
  • 5
  • 12
2
votes
1 answer

Multiple sessions in neo4j ogm

I am building a neo4j ogm service using ogm in java. I need to connect to 2 neo4j server from my service to handle failover and replication. Is it possible to create multiple session each towards different neo4j server from one ogm service.
Swapnil
  • 121
  • 1
  • 4
2
votes
1 answer

Neo4j : Too many open files even after restarting the server

I'm using Neo4j 3.2.2 and Spring Data Neo4j on my project Blockchain2graph. My batch is getting data from bitcoind and insert them into neo4j. After each imported block, I make a session.clear(). After some time, i get a : Could not open Neo4j…
2
votes
0 answers

Neo4j, SDN4, ActiveMQ multiple consumers and data syncronization

In order to speed up the data consumption in my application(Spring Boot, Neo4j database, Spring Data Neo4j 4) I have introduced Apache ActiveMQ and configured 10 concurrent consumers. Right after that I ran into the issue with a counter updates. I…
alexanoid
  • 24,051
  • 54
  • 210
  • 410
2
votes
1 answer

Neo4j SDN 4 GraphId performance vs Index

At my Neo4j/SDN 4 application all of my Cypher queries are based on internal Neo4j IDs. This is an issue because I can't rely on these IDs at my web application urls. Neo4j can reuse these IDs so there is a good chance that at some time in future…
alexanoid
  • 24,051
  • 54
  • 210
  • 410
2
votes
1 answer

Neo4j SDN internationalization

I have a following SDN 4 entities: Decision, Characteristic and Value: @NodeEntity public class Value { private final static String SET_FOR = "SET_FOR"; private final static String SET_ON = "SET_ON"; @Relationship(type = SET_FOR,…
alexanoid
  • 24,051
  • 54
  • 210
  • 410
2
votes
0 answers

Neo4j-ogm ClassCastException in date converter

I have an application using neo4j-ogm 2.1.3 and I have the following exception: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String org.neo4j.ogm.exception.MappingException: Error mapping GraphModel to instance of…
tigrou83
  • 157
  • 10
2
votes
1 answer

neo4j Session.clear in multiple thread

I'm having memory issues with Neo4j when I insert lots of data in neo4j. Things have been better after adding a session.clear() after each big treatments. I'm planning to make different threads for every insert. Do i have to end all threads with a…
2
votes
0 answers

NullPointerException on query in Neo4j 3.0.4 enterprise

I am running Neo4j 3.0.4 Enterprise in HA and am encountering an extremely mysterious issue. On doing a very basic Cypher query from our Spring Data Neo4j application (following is taken from the Neo4j DB query.log): MATCH (n:`Node`) WHERE n.`key`…
simonl
  • 1,240
  • 7
  • 19
2
votes
1 answer

Merge two nodes on session.save (unique nodes)

I'm trying to map some JSON objects to java objects and then save these objects to my neo4j db. I have tried to use simple neo4j-ogm and run: session.save(object), but if some nodes already exist they are duplicated instead of being merged. If I…
Cezar Sas
  • 306
  • 3
  • 14
2
votes
1 answer

Neo4j OGM - Save a relationship with depth 1 and ONLY the relationship

I'm trying create a relationship between 2 nodes A and B. A potentially has several hundreds of connections and B may be a newly created node. The way i'm doing it right now is by loading A with depth of 1, adding B as a child of A and then saving…
Abbas Gadhia
  • 14,532
  • 10
  • 61
  • 73
2
votes
1 answer

SDN4 - Cannot findById with list of id

In old version, SDN3, I can use findById(List id), but after upgrade to SDN4, I cannot use this function again, always return empty. This is my sample class : @NodeEntity public class Right{ @GraphId Long graphId; String id; //random…
David Vincent
  • 634
  • 1
  • 8
  • 33
2
votes
1 answer

How to map a Neo4j node using embeddable objects?

I'm asking if this is doable in Spring-Data-Neo4j (SDN) or Neo4j OGM because I understand that SDN actually uses Neo4j-OGM underneath. Assume I have 2 Java objects that I need to map to a single Graph node: @NodeEntity public class User { …
Muhammad Gelbana
  • 3,890
  • 3
  • 43
  • 81
2
votes
1 answer

How to get current neo4j session after SDN upgrade to 4.2.0.BUILD-SNAPSHOT?

After updating Spring Data Neo4j to 4.2.0.BUILD-SNAPSHOT several difficulties appeared. In particular, I need to get current Session instance to perform some custom query. I've been doing this using private Neo4jOperations getNeo4jOperations() { …
Poliakoff
  • 1,592
  • 1
  • 21
  • 40
2
votes
0 answers

Unique constraint violation SDN4

I am using SDN 4.1.2 and neo4j-org 2.0.4 with http driver When an unique constraint is getting violated on one of the nodes and I am within a transaction, I am getting TransactionException being thrown In the logs I see…