spring-data-neo4j

Hamcrest: when iterableWithSize fails, it gives a bad message like “got: com.xxx.MyIterClass$1@1970ae0”

我的未来我决定 提交于 2019-12-13 05:43:27
问题 In hamcrest (1.3.RC2, with no JUnit dependencies) I am failing using iterableWithSize() with a SpringDataNeo4j library. I have an (extension of) an Iterator parameterized with Content like this EndResult<Content> contents = contentRepository.findAllByPropertyValue("title", "*"); where EndResult is package org.springframework.data.neo4j.conversion; public interface EndResult extends Iterable {...} and Content is a a @NodeEntity Pojo. With the help of Mark Peters I learned that I should call it

scala and spring data neo4j - No FieldAccessor configured for field

你。 提交于 2019-12-13 04:39:57
问题 I am developing scala project using spring-data-neo4j library. Firstly, here is my `build.sbt name := """scheduling-backend""" version := "1.0" scalaVersion := "2.10.2" resolvers += "spray repo" at "http://repo.spray.io" resolvers += "spray nightlies" at "http://nightlies.spray.io" resolvers += "SpringSource Milestone Repository" at "http://repo.springsource.org/milestone" resolvers += "Neo4j Cypher DSL Repository" at "http://m2.neo4j.org/content/repositories/releases" libraryDependencies ++=

Spring Data Neo4j 4 and dynamic product properties

百般思念 提交于 2019-12-12 18:19:17
问题 In my Neo4j/SDN project I have to implement a following task - I have a parent Node(let's say ParentNode ) that must define a set of product characteristics, for example: weight: Double size: Integer license: String active: Boolean Also, new product characteristics( with any new name and type ) can be added during the application runtime. ParentNode can have a set of child nodes(let's say ProductNode ) and each of these nodes can provide an own value for a certain characteristic defined by a

DynamicRelationshipType in Spring Data Neo4j or defining relationship types at runtime

感情迁移 提交于 2019-12-12 18:05:47
问题 Can I specify relationship type at runtime?? I am creating a set of relationshipEntity objects within an Entity using something like @Fetch @RelatedToVia(type="RELATED_IN_SOME_WAY", direction = Direction.BOTH) Set<ThingRelationship> relationships = new HashSet<ThingRelationship>(); where ThingRelationship is @RelationshipEntity public class ThingRelationship { public ThingRelationship() { super(); } //incremental neo4j set ID @GraphId Long nodeId; //Start and end nodes @StartNode Thing

SDN neo4j 3.0 Release Index Strategy

北战南征 提交于 2019-12-12 17:40:59
问题 Since I updated from RC1 to RELEASE I get this exception: org.springframework.data.mapping.model.MappingException: No index name allowed on label based indexes which means @Index will now default to Label and not Simple indexing. How do I specify the labels for each @NodeEntity ? From this link I think I should use @Labels but is this official ? Considering issue DATAGRAPH-433 will unique indexes use the old index strategy? The spring data neo4j documentation doesn't offer any clue. 回答1: You

How do I add a second label to a node in Spring Data Neo4J 3.0.0 (Release)?

こ雲淡風輕ζ 提交于 2019-12-12 15:36:31
问题 In Neo4J I have a @NodeEntity Person . I'd like to be able to also add additional labels such as :USER , :CUSTOMER , :OWNER , :AGENT , etc. It seems that spring-data-neo4j:3.0.0-RELEASE has support for an @Labels annotation, but I get a NullPointerException when trying to use it. @NodeEntity public class Person { @GraphId Long id @Indexed(unique=true) String email @Labels // <- Seems this is unsupported. private Collection<String>labels public void addLabel(String label) { this.labels.add

Neo4j 4.2 graph repo save method is now ambiguous

被刻印的时光 ゝ 提交于 2019-12-12 15:00:48
问题 I have just updated from Spring Data Neo4j 4.1.3 to 4.2.7 But, I have not been able to get my project to start running again after changing the maven dependency. I have fixed many issues as described in this tutorial: https://graphaware.com/neo4j/2016/09/30/upgrading-to-sdn-42.html But I cannot figure out why this issue has emerged. In my service > GenericService.java > createOrUpdate ... @Override public T createOrUpdate(T entity) { getRepository().save(entity, DEPTH_ENTITY_NEXT); //ERROR

Compare dates with Spring Data neo4j

旧街凉风 提交于 2019-12-12 13:46:15
问题 When querying for relationships on a java.util.Date property, what syntax should I use? I tried just using a query like (this is just an example to show what I'm trying to do, so please don't pay attention to variable names there): @Query("start n1=node({0}) match n1-[r:TYPE]->n2 where r.dateCreated>={1} return r") Page<Relationship> findAll(Node node, long date, Pageable pager); But it throws the following error: Caused by: Don't know how to compare that. Left: 1339845862883; Right:

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

断了今生、忘了曾经 提交于 2019-12-12 12:28:11
问题 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: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sharedSessionCreatorBean': Cannot resolve reference to bean 'sessionFactory' while setting constructor argument; nested exception is org.springframework.beans

Neo4j GraphRepository derived finder methods

老子叫甜甜 提交于 2019-12-12 05:13:11
问题 I have a problem with derived finder methods of GraphRepository. Short version: User foundUser1 = userRepository.findByEmail("test@gmail.com"); User foundUser2 = userRepository.findByPropertyValue("id", 1); works, but not: User foundUser3 = userRepository.findById(1); Long version: test-context.xml <context:annotation-config/> <neo4j:config storeDirectory="data/graph.db" /> <neo4j:repositories base-package="com.blbl.repository"/> <tx:annotation-driven mode="proxy"/> UserGraphRepository.java: