Neo4j OGM is a fast object-graph mapping library for Neo4j, optimised for server-based installations and utilising Cypher via the transactional HTTP endpoint. Neo4j-OGM aims to simplify development with the Neo4j graph database and 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.
Questions tagged [neo4j-ogm]
516 questions
4
votes
1 answer
How I guarantee I create only one new unique node between two existing nodes in a transaction
I have the following 2 existing nodes in my graph.
A Customer node identified by a unique customer number.
A Product node identified by a unique ISBN identifier.
I want to create an association between one Customer node and one Product node.
But I…

Donal Hurley
- 159
- 2
- 9
4
votes
4 answers
Neo4j SDN 4 emulate sequence object(not UUID)
Is it possible in Neo4j or SDN4 to create/emulate something similar to a PostgreSQL sequence database object?
I need this thread safe functionality in order to be able to ask it for next, unique Long value. I'm going to use this value as a surrogate…

alexanoid
- 24,051
- 54
- 210
- 410
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
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
3
votes
0 answers
Change Data Capture PostgreSQL to Neo4j
In my project I have PostgreSQL database as main DB and I need to keep synchronized my neo4j DB. To do so I want to use Debezium for CDC, kafka and neo4j streams plugin. One of the reasons I prefer Debezium to jdbc is because it's real time. So at…

Armen Sanoyan
- 1,898
- 2
- 19
- 32
3
votes
2 answers
Spring boot 2.0 neo4j ogm 3.0 compatible jetty version
I'm trying to upgrade spring boot from 1.5 to 2.0 and facing issue with jetty version. I'm new to neo4j ogm and spring boot.
When I try to run a test case it fails with below error.
java.lang.NoClassDefFoundError:…

Naveen
- 360
- 1
- 8
- 23
3
votes
1 answer
Spring Data Neo4j 5 node/relationship labels and inheritance
I have the following Spring Data Neo4j 5 entity:
@NodeEntity
public class Value extends Flaggable {
@Index(unique = true)
private Long id;
private String name;
private String description;
@Index(unique = false)
private…

alexanoid
- 24,051
- 54
- 210
- 410
3
votes
1 answer
Spring Boot - SDN 5 - Neo4j Auditing @CreatedDate doesn't work
I'm having some issues getting the @CreatedDate among other auditing functionality from working at all. I believe I've followed the guidance provided in the Reference Document but I believe something may be missing. I'm currently using Spring Boot…

AlfGarcia
- 31
- 1
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
Spring Data Neo4j 4 with Neo4j 3.0: How to pass configuration to embedded driver?
I am in the process of migrating an existing Spring Data Neo4j 3 application (with Neo4j 2.x) to Spring Data Neo4j 4.1 with Neo4j 3.0.
The actual migration is done, but the application now fails to start…

geld0r
- 800
- 10
- 22
3
votes
1 answer
Spring Data Neo4 - BeforeSaveEvent deprecated
In my Spring Data Neo4j 4 project - BeforeSaveEvent class is deprecated.
Also, previously I used a following code in order to setup created/updated date for my entities:
@EventListener
public void handleBeforeSaveEvent(BeforeSaveEvent event) {
…

alexanoid
- 24,051
- 54
- 210
- 410
3
votes
1 answer
Neo4j 3.0 and spring data
I would like to use the new bolt protocol to connect my spring application to neo4j 3.0 database.
Is bolt protocol already implemented in spring data?

aGO
- 1,263
- 14
- 30
3
votes
1 answer
How can I get Neo4j OGM to wire up all the POJOs returned from a complex query?
Say I have a query like this:
START a=node(1), b=node(2) MATCH p=a-[:LINKED_TO*0..]->b
WITH nodes(p) as pathList UNWIND pathList AS pathNode
MATCH breakfast=pathNode-[:HAS_A]->(:Bagel)
RETURN pathList, breakfast
I want a List corresponding…

Tyler
- 373
- 1
- 14
3
votes
2 answers
Custom query in Spring Data Neo4j not retrieving relationships
So for a few complex operations, I am using custom Cypher queries using the @Query annotation on my custom finder methods in my graph repositories. However, while it retrieves the node, it does not retrieve its direct relationships (i.e. only 1…

Marc Byfield
- 510
- 4
- 14