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

Neo4j - Discriminating relationships based on end node sub class type

I notice when inheritence is used in a spring-data-neo4j 4 data model, the super class is used as the discriminator when loading and discriminating relationships based on end node type. Is there any way I can force spring-data-neo4j-4 to use a…
John Deverall
  • 5,954
  • 3
  • 27
  • 37
2
votes
1 answer

No mapping found with @RestController an @RequestMapping

I have the following Controller @RestController("/person") public class PersonController { @Autowired PersonService personService; @RequestMapping(value = "/list", method = RequestMethod.GET, …
mCs
  • 2,591
  • 6
  • 39
  • 66
2
votes
2 answers

SDN4 Enum to String conversion fails

I have an entity class: @Data @JsonIdentityInfo(generator=JSOGGenerator.class) @NodeEntity(label="Person") public class PersonNode { @GraphId private @NonNull Long id; @Property(name="neo_ID") private @NonNull Long…
mCs
  • 2,591
  • 6
  • 39
  • 66
2
votes
0 answers

Relationship updates not as expected when multiple relationships exist between the same two classes using SDN 4

I have a Spring Boot application using Spring Data Neo4j 4 (4.0.0.RELEASE and Neo4j Community Server 2.2.5). I'm using the latest snapshot version of the neo4j-ogm library (1.1.4-SNAPSHOT) as the dependency for SDN 4. The application and now an…
GT2015
  • 85
  • 4
2
votes
1 answer

How to create a console app with Spring Data Neo4j 4?

I have a console module / app (not a webapp), which I'd like to use with a service module / app built using spring-data-neo4j. Console App ---> Uses Spring Data Neo4j module I'm using what I think is the standard way to configure my session,…
John Deverall
  • 5,954
  • 3
  • 27
  • 37
2
votes
1 answer

SDN4 Config - java.lang.annotation.AnnotationFormatError: Invalid default: ...EnableNeo4jRepositories.repositoryBaseClass()

I'm getting the following error with Spring Data Neo4j 4. I think it could be a dependency conflict but I'm not sure what. java.lang.IllegalStateException: Failed to load ApplicationContext at…
John Deverall
  • 5,954
  • 3
  • 27
  • 37
2
votes
1 answer

Specify depth > 1 with @Query in Spring-Data-Neo4j Repository

Using a spring-data-neo4j repository, can I use a @Query and load nodes with a depth greater than 1? My example is @Query("match (m:NodeTypeA)-[r:REL1]-(n:NodeTypeB {nodeBUniqueProperty: {0}}) return m") public NodeTypeA…
John Deverall
  • 5,954
  • 3
  • 27
  • 37
2
votes
1 answer

Spring Data Neo4j 4.0: Duplicate nodes created, should create relationship instead

Summary: With SDN4, I'm persisting 10 objects of which half have the same content only the id's to which they are linked differ. The linking ID's are set as @Transient. Still, two objects are created with the same content instead of one with two…
2
votes
1 answer

equivalent of template.createRelationBetween in SDN4

My project is currently use Spring-Data-Neo4J 3.3.0 and I'm trying to use the new 4.0.0.Release version. In my code I have the following code : neo4jTemplate.createRelationshipBetween(eltOrRel, attribute, valueClass, GraphRelationType.HAS_ATT_VALUE,…
clement
  • 489
  • 1
  • 5
  • 18
2
votes
3 answers

Entity is not an instance of a persistable class NEO4J 4.0.0

Spring data neo4j 4.0.0 Release In spring mvc project i am trying to save a node by repository.save() method i am getting error. @NodeEntity public class Category { @GraphId public Long id; public String categoryName; public…
arun kumar
  • 247
  • 2
  • 5
  • 15
2
votes
1 answer

SDN:4 Value injection into Converter fails

I wrote a custom converter for my graph property as shown below. Entity class @NodeEntity(label = "Person") public class Person extends AbstractEntity { @Property(name = "accessCount") private Long accessCount; @Property(name =…
Viswanath
  • 1,413
  • 13
  • 25
2
votes
1 answer

Can I use Spring Data Neo4j 4.0.0 on an embedded neo4j database?

I understand that was possible in previous versions, and I also understand that version 4.0.0 is a total redesign towards a server-first approach, but nowhere in the documentation it is said whether embedded mode is supported.
user3408654
  • 301
  • 1
  • 13
2
votes
1 answer

Incorrect derived query for byId in Spring Data Neo4j

I have two entities: User and Connection, along with two appropriate repositories. Both entities has @GraphId id field. Connection entity has User user field. In ConnectionRepository interface I added following method: List
2
votes
1 answer

Neo4j : loadByProperty is loading the other objects that doesn't belong to the node

my structure is as follows: a company -> having set of users -> each user is having set of policies -> each policy is for a company. sample graph structure : u1 <- c1 -> u2 p1 -> c1 u1 -> p1 company(c1) is having two users…
madireddy
  • 107
  • 3
  • 13
2
votes
1 answer

Cannot retrieve a set of super type object from SDN4

The feature of Neo4j that can save super type as one of the labels is really great, but I cannot retrieve a set of the super type as I expected. The super class is called Service @NodeEntity public abstract class Service implements…