Questions tagged [spring-data-neo4j-5]

To be used for Spring Data Neo4j 5.0+ information

Project Site: https://projects.spring.io/spring-data-neo4j/

Project Reference Docs: https://docs.spring.io/spring-data/neo4j/docs/5.0.x/reference/html/

GitHub Source: https://github.com/spring-projects/spring-data-neo4j

34 questions
7
votes
4 answers

Neo4J In Microservices Architecture

To keep in line with DDD and Bounded Contexts, its well known that when you create your microservices you should keep separation of concerns. One of the main benefits of Neo4J is keeping your "connected" data in Neo4J so relationships between them…
5
votes
1 answer

How to mark a custom Spring Data Neo4j 5.0.3 cypher query as read-only

I am currently working on a Spring Data Neo4j 5.0.3 REST API application that interfaces with a Neo4j 3.3.1 causal cluster consisting of 3 core nodes (1 leader and 2 followers). For better or for worse, we are also submitting a lot of custom cypher…
simonl
  • 1,240
  • 7
  • 19
3
votes
0 answers

spring data neo4j 5 - no bean named 'sessionFactory' available

I'm using spring data neo4j (5.0.7.RELEASE) and spring (5.0.6.RELEASE) with configuration from the docs https://github.com/spring-projects/spring-data-neo4j#quick-start When I try to start the application it fails with this exception: Caused by:…
Slava
  • 311
  • 3
  • 9
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…
3
votes
1 answer

Neo4j Can not set java.lang.Long field model.Authority.id to model.Authority

I'm trying to get Neo4j working, but I end up getting this errror when either trying to get an entity, or persist one, and cannot figure it out. Caused by: java.lang.IllegalArgumentException: Can not set java.lang.Long field…
Tim
  • 77
  • 9
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
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; …
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

Spring Data Neo4j 5's EntityScan includes companion objects when using Kotlin

I am using Spring Data 5 via Spring Boot 2.0.0.M4. I noticed that when using @EntityScan and providing a package, it includes scanning of 'inner' classes that are generated by Kotlin. In my example below, I only have one property, but I have also…
jpop
  • 59
  • 7
1
vote
1 answer

When RelationshipEntity is explicitly defined don't forget to change your model?

Using domain classes below within a sdn5 application, I'm able to create people and to store them in neo4j. Everything is ok from a DB point of view (nodes and relation are present). import com.fasterxml.jackson.annotation.JsonIgnore import…
Patrice Conil
  • 83
  • 1
  • 8
1
vote
2 answers

Spring Data Neo4j 5 - HttpMessageNotWritableException when hitting resource endpoints

In an attempt to recreate the Spring Data Neo4j official Movies example in Scala I have ran into an issue jsonifying on the Spring Data Neo4j layer. The details are noted in the README in this example project. Booting the Spring app and hitting…
1
vote
1 answer

Updating node without retrieving it first using Neo4j OGM

I have a structure, which (simplified) looks like this: @NodeEntity(label = "Entity") class FullEntity { @Id @GeneratedValue var _id: Long? = null @Id @Index(unique = true) lateinit var uuid: String lateinit var someMoreData:…
MaciejGórski
  • 22,187
  • 7
  • 70
  • 94
1
vote
1 answer

Spring Data Neo4j/OGM session query for domain object

I have the following Neo4j SDN5/OGM/Cypher logic: MATCH (v:Value)-[:CONTAINS]->(hv:HistoryValue) WHERE v.id = {valueId} OPTIONAL MATCH (hv)-[:CREATED_BY]->(u:User) WHERE {fetchCreateUsers} WITH u, hv ORDER BY hv.createDate DESC WITH count(hv)…
alexanoid
  • 24,051
  • 54
  • 210
  • 410
1
2 3