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
2
votes
2 answers
Saving a subclass or array list in relationship entity on Neo4J Spring Boot OGM
I have a query on how to save a Subclass or ArrayList inside the relationship entity?
My issue: When I pass data to the save call from the repository to save Child as part of the Parent there is no issue or error, but when I retrieve or lookup in…

Anush B M
- 91
- 1
- 6
2
votes
1 answer
What is the cause of Cannot merge node using null property value for uuid in Spring Data Neo4j starter and OGM SessionFactory?
Apparently this is a common exception but, all the questions asked here seem to be related to CSV hence, why this question.
I have a domain object that make use of uuid as unique id and is declared as follow
@NodeEntity(label = "TNODE")
public…

Raf
- 7,505
- 1
- 42
- 59
2
votes
1 answer
How to resolve spring bean conflicts with between spring-data-neo4j and Grails 3.3.6
I have a Grails 3.3.6 application. I wanted to merge some neo4j functionality in this app from a different spring boot application. So I added the following deps from spring boot app -
compile "org.neo4j:neo4j:3.1.0"
compile…

Prakash Balodi
- 33
- 5
2
votes
1 answer
Find node by its property name using neo4j OGM
I have my SkillCluster class as follows
public class SkillCluster {
@Id @GeneratedValue
private Long id;
private String Name;
private String CleanedText;
@Relationship(type = "BelongsTo", direction = Relationship.INCOMING)
…

Anurag Sharma
- 4,839
- 13
- 59
- 101
2
votes
0 answers
SDN5: Found more than one matching @RelationshipEntity for (14762)-[CONTAINS]->(14781) but cannot tell which one to use
I have created two different Spring Data Neo4j 5 @RelationshipEntity with the same type:
@RelationshipEntity(type = "CONTAINS")
public class CharacteristicRelationship {
@Id
@GeneratedValue
private Long id;
@StartNode
private…

alexanoid
- 24,051
- 54
- 210
- 410
2
votes
0 answers
Make neo4j-ogm university example work in 3.0
I am trying to have the example from https://github.com/neo4j-examples/neo4j-ogm-university work with the latest version (downloaded Jan 2018).
I made a small fix, proposed for merge into the code, to declare the use of checklist-model, and most of…

hjohanns
- 96
- 8
2
votes
1 answer
Neo4J with OGM dynamic @RelationshipEntity/@Relationship value
It´s possible to use a dynamic value for Relation Nodes?
I would like to set different Relation make for each graph on Neo4j, I think this could increase the performance of Neo4j, but I would like to know if it´s possible to use OGM on Java with…

Dante
- 742
- 6
- 10
2
votes
2 answers
Are ids in @NodeEntity objects unique (ie not recycled) in SDN (Spring Data Neo4j) 5.0.2.RELEASE?
As per the example code retrieved here: http://projects.spring.io/spring-data-neo4j/
A node entity can be created with the following code:
@NodeEntity
public class Movie {
@Id @GeneratedValue Long id;
String title;
Person director;
…

Coder Shark
- 437
- 2
- 5
- 13
2
votes
1 answer
Neo4j - EventListener registration
I'm using Neo4j OGM 2.1.3 with Spring Boot 1.5.9
in the documentation reference of both spring data and neo4j ogm, registration of event listener is explained as the following code.
class AddUuidPreSaveEventListener implements EventListener {
…

Ali.Wassouf
- 309
- 4
- 21
2
votes
1 answer
Spring Data Neo4j 5 and @Index for dynamic @Properties
Hot to properly index SDN 5 dynamic @Properties?
Will the following property declaration work:
@Index(unique = false)
@Properties(prefix = NAME_PROPERTY_PREFIX)
private Map nameProperties = new HashMap<>();
will all properties keys…

alexanoid
- 24,051
- 54
- 210
- 410
2
votes
1 answer
Spring Data Neo4j 5 and dynamic @Properties - InvalidDataAccessApiUsageException
This is my SDN 5 relationship entity:
@RelationshipEntity(type = "HAS_VALUE_ON")
public class RelationshipValue {
@Id
@GeneratedValue
private Long id;
@StartNode
private Decision decision;
@EndNode
private Valuable…

alexanoid
- 24,051
- 54
- 210
- 410
2
votes
1 answer
Neo4j OGM updation deletes other attributes of entity
I am using neo4j OGM for CRUD operations. But when I use session.save(entity, 0) where entity has only id and updated attribute, other attributes associated with entity are deleted fro neo4j entity.
For example Object car has id, name and year.
If…

gauravparmarbliss
- 65
- 1
- 2
- 7
2
votes
1 answer
neo4j-ogm returns null bookmark when executed in transaction/concurrently
Scenario 1:
When I execute the following code without opening a transaction, it returns bookmark successfully.
Session session2 = sessionFactory.openSession();
session2.query("MATCH (n) RETURN count(n)", new HashMap<>());
String…

Shubham Chaurasia
- 2,472
- 2
- 15
- 22
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