Questions tagged [neo4j-ogm]

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.

Docs: https://neo4j.com/docs/ogm-manual/current/

Source: https://github.com/neo4j/neo4j-ogm

516 questions
3
votes
1 answer

Neo4j 2.3.1 Server dies when saving SDN4 Entity with multiple relationships

I'm writing an application for a guide service and I'm running a 3 server cluster of Neo4j 2.3.1 on digital ocean droplets. I'm also using Spring Data Neo4j 4.0.0.RELEASE from a JSF web app running under Tomcat to write and query my data. I have a…
wwixon
  • 45
  • 5
3
votes
1 answer

Settings Relationship Properties in Neo4J OGM

I found out about Neo4j OGM yesterday and quickly made a new project to test out how it works. One problem I've come across is setting Relationhip properties as this is crucial for my project. Here's an example: Room Node: @NodeEntity public class…
3
votes
1 answer

What are the differences between Spring Data Neo4j 4 and neo4j-ogm?

I notice SDN4 has the concept of repositories and annotations for cypher queries, but this seems not much more than programming style? Neo4j-OGM seems straight forward, easy to set up, with a really practical and efficient API. I'm wondering why…
John Deverall
  • 5,954
  • 3
  • 27
  • 37
3
votes
1 answer

Neo4j OGM and relations with subclasses

Running into a problem with the Neo4j OGM library and having a relationship to "subclasses": @NodeEntity class MyEntity{ @GraphId private Long graphId; ... } class MyRoot extends MyEntity{ MyResource resource; ... } class…
Max Spring
  • 1,111
  • 2
  • 11
  • 18
2
votes
1 answer

Spring Data Neo4j OGM return apoc.coll.intersection from repository method

I have the following Spring Data Neo4j OGM Repository method: @Query("MATCH (root:Location) " + "WHERE root.id IN $locationIds " + "WITH root " + "OPTIONAL MATCH (root)-[:CONTAINS*0..]->(descendant:Location) " + …
brunoid
  • 2,121
  • 2
  • 12
  • 22
2
votes
1 answer

Required identifier property not found for class Person, when using Neo4j ogm?

I'm new to neo4j. From what I've read so far I understand that it's generally bad practise to use the default parameter externally of my app. I'd therefore like to be able to specify my own personId parameter separate of . To do this, I'd…
Freid001
  • 2,580
  • 3
  • 29
  • 60
2
votes
0 answers

How to apply query timeout in Community Neo4j JAVA Bolt Driver Api

How to apply Transaction timeout in Community Neo4j JAVA Bolt Driver API I am trying to apply TransactionConfig timeout but it seems to not take effect. session.beginTransaction(TransactionConfig.builder() …
Nischal Kumar
  • 492
  • 7
  • 15
2
votes
1 answer

Is there any way to automatically generate java classes from Neo4j graph database

In my application, we choosen Neo4j as database. We have designed the database with all the required nodes and relationships. We are trying to integrate the in our springboot java program with reactive neo4j repository. Now we are planning to create…
2
votes
1 answer

Map arbitrary relations via Neo4j OGM

Neo4j OGM supports arbitrary node properties being mapped to entity classes via @Convert and CompositeAttributeConverter but what about the relation part? How would I map arbitrary relations in a @NodeEntity? The actual properties and relations…
Steffen Harbich
  • 2,639
  • 2
  • 37
  • 71
2
votes
1 answer

Neo4j returning duplicate nodes while traversing

While querying the ne04j for the traversing order. it's traversing multiple times few nodes. I am attaching the cypher query to create nodes and relationships and results it returns. Any help is appreciated. CREATE (a:Package {name:'A'}) CREATE…
user1844634
  • 1,221
  • 2
  • 17
  • 35
2
votes
1 answer

Neo4j - Get all the related nodes and relationships for a given node

I am using Neo4j (version 3.4.1) and Spring-data-neo4j (5.0.10.RELEASE) in my application. I am also using OGM. I have the below relationship between my nodes: A vehicle (V) has Part(s) (P1 and P2). Parts can be bought from dealers (D1, D2 and D3).…
LearnToLive
  • 462
  • 9
  • 25
2
votes
0 answers

Neo4j @Relationship always returns null

I am always getting null from the annotated @Relationship field (from neo4j ogm). Below is my simplified class implementation. @NodeEntity public class A { @Id @GeneratedValue private Long id; @Relationship(type = "HAS") private Set mB; …
Da_Pz
  • 698
  • 5
  • 13
2
votes
1 answer

Neo4j Cypher - Get nodes on multiple paths separately and in order

I am using Neo4j (version 3.4.1) and Spring-data-neo4j (5.0.10.RELEASE) in my application. I am also using OGM. I have the below relationship between my nodes: I want to find all the nodes in each path from node A to node F (in the order of…
LearnToLive
  • 462
  • 9
  • 25
2
votes
1 answer

Neo4j - how to delete relationship with another node on save or update of a related node

I am using Neo4j (version 3.4.1) and Spring-data-neo4j (5.0.10.RELEASE) in my application. I am also using OGM. I have the following domain model (Vehicle and Part): Vehicle class @NodeEntity @Data @NoArgsConstructor public class Vehicle…
LearnToLive
  • 462
  • 9
  • 25
2
votes
1 answer

"Fatal error occurred during protocol handshaking: Connection reset by peer" in Neo4j

Running a Cypher batch statement (CALL apoc.periodic.iterate() in a @Query annotation of a Neo4jRepository), I encountered repeatedly the following error situation after a couple of hours of computation. Neo4j 3.4.9, Enterprise Edition. Neo4j…
ThirstForKnowledge
  • 1,245
  • 1
  • 10
  • 27
1 2
3
34 35